How to WRITE, READ, UPDATE and DELETE data with Firebase database using JavaScript

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 57

  • @Itsreedgraff
    @Itsreedgraff 3 роки тому +12

    You deserve so much more love from the YT algorithm... Thank you. Lifesaver.

  • @davigibson3356
    @davigibson3356 6 місяців тому +1

    3 years old and still saving lives like mine right now 😅. Excellent video man, congrats

  • @HL_SAIRA
    @HL_SAIRA 3 місяці тому

    Thanks man,This Helped Me A Lot 🙏🙏

  • @hackingfoundation2899
    @hackingfoundation2899 3 роки тому +1

    Epic like always man

  • @gaganpreetsinghsidhu
    @gaganpreetsinghsidhu 3 роки тому +1

    sir, i had done exactly same coding but everytime its showing 'saved' notification, instead of update or delete & delete function isn't working it just updates that particular user for ex:'test' leaving other columns empty except 'username' column.

    • @MelvinAdekanye
      @MelvinAdekanye  3 роки тому +6

      No worries. The reason is....... I changed the buttons onclick event to call the other functions. But you don't see it, because I edited it out of the video.
      To put it simply, create more buttons to call the other functions. Or, change the onclick event of that one button to test it out. (Which is what I did)
      Thanks for asking. Others may have the same question. Hope this helps !

  • @MoviesPlaza
    @MoviesPlaza 2 роки тому

    sir can you make an admin panel which list all our user, we can add new user, edit user, delete, and update too...

  • @catsNcode
    @catsNcode 2 роки тому +1

    you deserve a million subscribers for how simple you made this. Got it down in 9 mins that i couldn't with hours reading Google's documentation.
    For some reason the onclick kept saying it wasn't defined so i used event listener on the element as a workaround.
    document.querySelector('#submit').addEventListener('click', () => {
    let name = document.getElementById('name').value;
    let email = document.getElementById('email').value;
    let username = document.getElementById('username').value;
    firebase.database().ref('user-info/' + username).set({
    name: name,
    username: username,
    email: email
    })
    })

    • @MelvinAdekanye
      @MelvinAdekanye  2 роки тому

      Thanks! And thanks for the tip - maybe others could benefit.

  • @nixxxxx_01
    @nixxxxx_01 8 місяців тому +1

    i copied all your process but the data and alert is not reflecting

    • @thegamercm796
      @thegamercm796 7 місяців тому +1

      Try opening the file in live server or in any other localhost

  • @gamerdrexx9282
    @gamerdrexx9282 8 місяців тому

    Heyy melvin, I started watching your videos and they're great. I wanna ask tho, I have this website that has a form and the form uses firebase. Is there to build a page that views all those to fill the form

    • @MelvinAdekanye
      @MelvinAdekanye  7 місяців тому

      This sounds interesting - could you rephrase the question in a simpler way?

    • @gamerdrexx9282
      @gamerdrexx9282 7 місяців тому

      Alright. So I have this online store I'm building for a client and I am using firebase to build this project's database. So when a user wants to checkout a cart, their username, the ordered items as well as logistics data is sent to Firebase. So when the client wants to view orders I want to build a web page that she can go to and all the orders in the firebase node will be displayed to her

  • @rednixch
    @rednixch 3 роки тому

    it doesn't save the data in the database (but it saying saved) can you help me please

    • @MelvinAdekanye
      @MelvinAdekanye  3 роки тому

      Two questions? Is your Firebase Database rules set to true? Are here any alerts or errors in your console?

    • @rednixch
      @rednixch 3 роки тому

      @@MelvinAdekanye Sry its solved it was because my database was not in the US region 😅

  • @gilluisfrancisco6311
    @gilluisfrancisco6311 10 місяців тому

    What's the name of song in background?

  • @MaxProgramming
    @MaxProgramming 3 роки тому +1

    Nice way to pass time at 0:50 😂

  • @jaredjeiodelapaz7774
    @jaredjeiodelapaz7774 Рік тому

    why is my sdk snippet not appearing.

  • @nadaahmed5987
    @nadaahmed5987 10 місяців тому

    I'm so cofused the form doesn't submit anything, I have firebase installed and everything ready, there's even no alert

    • @nixxxxx_01
      @nixxxxx_01 8 місяців тому

      same, have u solved the problem?

    • @MelvinAdekanye
      @MelvinAdekanye  7 місяців тому

      Let's chat - shoot me an email.

  • @peschebichsu
    @peschebichsu 3 роки тому +1

    Great tutorial!

  • @psviraljain
    @psviraljain Рік тому +1

    Thanks man, appreciate it!

  • @Alaaja_aj
    @Alaaja_aj Рік тому

    yo dude you are the best.

  • @jithinkumar5456
    @jithinkumar5456 3 роки тому

    How can u print all the data in a single alert?

    • @MelvinAdekanye
      @MelvinAdekanye  3 роки тому

      In the get function. You would simply alert(data). Where the data is equal to snapshot.val()

  • @kobepwe2513
    @kobepwe2513 3 роки тому

    Can this work to signup and login form? thanks in advance

  • @olivierboulanger1118
    @olivierboulanger1118 3 роки тому

    Hello thx for your video. Does it work with version 9 of firebase ?

  • @ayaka905
    @ayaka905 4 місяці тому

    u saved me dude

  • @gireen
    @gireen 3 роки тому +1

    thank you! you save me ㅠㅠ

  • @ryujiiin22
    @ryujiiin22 2 роки тому

    thank you! you save me sir thank you very much

  • @rufatabbasov
    @rufatabbasov Рік тому

    Thank you!

  • @honzosaurus42069-no_furry
    @honzosaurus42069-no_furry Рік тому +1

    My only question is why is it not working in 2023

    • @MelvinAdekanye
      @MelvinAdekanye  Рік тому

      Let's work through it together - are you getting any errors in your console?

    • @honzosaurus42069-no_furry
      @honzosaurus42069-no_furry Рік тому

      @@MelvinAdekanyeWell I think It's just the version of firebase; this video is rly old. But I'm good thx. No need 4 help 👍

  • @masterlook5
    @masterlook5 3 роки тому

    much appreciated! :)

    • @MelvinAdekanye
      @MelvinAdekanye  3 роки тому

      Any time!

    • @masterlook5
      @masterlook5 3 роки тому

      @@MelvinAdekanye your new website is not as good as the old ones. the source code is very small and segmented, which makes it harder to view and understand.

    • @MelvinAdekanye
      @MelvinAdekanye  3 роки тому

      @@masterlook5 You're my very first critic. Thanks for the feedback. I'm definitely going to work on a system to expand the "viewport".
      Thanks again. Let me know what you think of the changes I make in a couple days.

  • @onnvvv
    @onnvvv 3 роки тому

    Awesome Video Keep it up :)

  • @AlexanderWilhite
    @AlexanderWilhite Рік тому

    • never trust a nerd to explain simple shit online