Hi, so i’m currently creating a project where my website retrieves orders from customers in my database which I created in Firebase. My problem is verifying I’ve connected to the database and then displaying it in my table. Thank you in advance for any help! Just in case you need to know I am able to host on firebase using my firebase.json file as well.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.gstatic.com/firebasejs/5.8.0/firebase.js"></script>
</head>
<body>
<script src="https://www.gstatic.com/firebasejs/5.8.0/firebase.js"></script>
<script>
var config = {
apiKey: "****",
authDomain: "rgjnrgjndrg",
databaseURL: "grdgrmkjdgrmkdr",
projectId: "rgrdgdrgrddrg",
storageBucket: "grdbrghdrbhg",
messagingSenderId: "grngrdjngrjndrgkj"
};
firebase.initializeApp(config);
});
</script>
<table id ="orders">
<tr>
<th>Order</th>
<th>name</th>
<th>order No.</th>
<th>Items</th>
<th>Price</th>
</tr>
<tr>
<td>ben</td>
<td>c345</td>
<td>food</td>
<td>£500</td>
</tr>
</table>
</body>
</html>
<style>
body {
font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif;
margin: 2em;
}
h1 {
font-style: italic;
color: #373fff;
}
#orders{
border:2px solid black;
}
th{
border: 1px solid black;
border-left:none;
border-right:none;
}
</style>
MOD EDIT: remove sensitive data