Firebase web db help

function js(){
    console.log("Added Javascript course");
    alert("Added Javascript course")
    window.location = "payment.html";

function html(){
    console.log("Added HTML course");
    alert("Added HTML course")
    window.location = "payment.html";

function python(){
    console.log("Added Python Course");
    alert("Added Python Course")
    window.location = "payment.html";

import { initializeApp } from "";
import { getAnalytics } from "";
const firebaseConfig = {
    apiKey: "AIzaSyD6_EzcFmia_xKm2OKRn5KJxF8CZoXs6ro",
    authDomain: "",
    projectId: "coding-courses-shop-1",
    storageBucket: "",
    messagingSenderId: "217818989604",
    appId: "1:217818989604:web:73c71665daf99960e944b1",
    measurementId: "G-H8Z0D11C0F"

  // Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

import { getDatabase } from "firebase/database";

const database = getDatabase();
import { getDatabase, ref, set } from "firebase/database";

function writeUserData(id) {
  const db = getDatabase();
  firebase.database().ref("Course Number").set({
      Coursenumber: id,

code is this.

whenever i am running it nothing happens

all files link
pls help

Do you have your dev tools console open? I suspect there are a few errors showing. First thing i notice? All import statements must be before any other code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.