How to WRITE, READ, UPDATE and DELETE data with Firebase database using JavaScript
ฝัง
- เผยแพร่เมื่อ 13 ก.ย. 2024
- How to WRITE, READ, UPDATE and DELETE data with Firebase database using JavaScript using JavaScript. Hey guys and gurls. I'll be showing you how to save and get data from Firebase database. Not only so. You'll be gifted with knowledge on how to update and delete data in the database. (LOL)
It's super easy. Sit back and relax.
Firebase: firebase.googl...
Source Code: rhymbil.netlif...
Patreon: / rhymbil
Until Next Time
RhymBil Out
3 years old and still saving lives like mine right now 😅. Excellent video man, congrats
You deserve so much more love from the YT algorithm... Thank you. Lifesaver.
Glad it helped! You're most welcome.
u saved me dude
Epic like always man
You know it. Glad the video helped.
Nice way to pass time at 0:50 😂
Hahaha. For sure.
Thanks man, appreciate it!
chup bc
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
})
})
Thanks! And thanks for the tip - maybe others could benefit.
Great tutorial!
Thank you!
thank you! you save me ㅠㅠ
thank you! you save me sir thank you very much
No problem. Glad I could help!
yo dude you are the best.
You're the best!! Thanks bro 🔥
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
This sounds interesting - could you rephrase the question in a simpler way?
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
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.
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 !
Thank you!
Glad to hear it!
sir can you make an admin panel which list all our user, we can add new user, edit user, delete, and update too...
Yes you definitely can.
i copied all your process but the data and alert is not reflecting
Try opening the file in live server or in any other localhost
What's the name of song in background?
much appreciated! :)
Any time!
@@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.
@@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.
Hello thx for your video. Does it work with version 9 of firebase ?
That's awesome. Yes absolutely.
why is my sdk snippet not appearing.
I'm so cofused the form doesn't submit anything, I have firebase installed and everything ready, there's even no alert
same, have u solved the problem?
Let's chat - shoot me an email.
it doesn't save the data in the database (but it saying saved) can you help me please
Two questions? Is your Firebase Database rules set to true? Are here any alerts or errors in your console?
@@MelvinAdekanye Sry its solved it was because my database was not in the US region 😅
Can this work to signup and login form? thanks in advance
Yes, absolutely
How can u print all the data in a single alert?
In the get function. You would simply alert(data). Where the data is equal to snapshot.val()
My only question is why is it not working in 2023
Let's work through it together - are you getting any errors in your console?
@@MelvinAdekanyeWell I think It's just the version of firebase; this video is rly old. But I'm good thx. No need 4 help 👍
Awesome Video Keep it up :)
Thanks, will do!
@@MelvinAdekanye wlc :D
• never trust a nerd to explain simple shit online