开发者

Display Content From Firebase Database

开发者 https://www.devze.com 2022-12-07 22:43 出处:网络
This is my database layout Above is my database layout. My goal is to display all of the names on a webpage. For example, a page that lists the names in the database. Like below:

This is my database layout

Above is my database layout. My goal is to display all of the names on a webpage. For example, a page that lists the names in the database. Like below:

Example Name 1

Example Name 2

Example Name 3

I have tried looking through tutorials and such, but none actually tell me how. I am using a firebase realtime database.

I am looking to do this in HTML and javascript.

function InsertData() {
            set(ref(db, "People/"+ enterName.value),{
                N开发者_Go百科ame: enterName.value,
                Email: enterEmail.value,
                Message: enterMessage.value
            })
            .then(()=>{
                alert("Data added successfully");
            })
            .catch((error)=>{
                alert(error);
            });
        }

If needed, the code I use to push data is above.

0

精彩评论

暂无评论...
验证码 换一张
取 消