Retrieving data in realtime from firebase



I am learning fire with web but I am able to retrieve the data in real time but how can I edit this data and then update it, not able to understand that parT I tried the code below but to no use, I intend to load data into text boxes and then make them editable by clicking on the text box.

Any help is appreciated.



var registration = firebase.database().ref("REGISTRATION");
var dataRef = firebase.database().ref("REGISTRATION");
var ref = firebase.database().ref("REGISTRATION");
var key;

function updatedtable()
    dataRef.on("child_added", function(data){
    var rData = data.val();
    $("#append").append("<tr><td>" + + "</td><td>" + + "</td><td>" + rData.gender + "</td><td>" + rData.birthdate + "</td><td>" + + "</td><td>" + rData.state + "</td><td>" + + "</td><td>" + rData.class + "</td><td>" + rData.classname + "</td></tr>");
// Saving data to firebase DB
function dbsave (){

  var email = $("#email").val();
  var name = $("#name").val();
  var password = $("#password").val();
  var genval = $("#gender").val();
  var birthdate = $("#birthdate").val();
  var phone = $("#phone").val();
  var state = $("#state").val();    
  var school = $("#school").val();
  var clas = $("#clas").val();
  var classname = $("#classname").val();
    email: email,
    name: name,
    password: password,
    gender: genval,
    birthdate: birthdate,
    phone: phone,
    state: state,
    school: school,
    class: clas,
    classname: classname
    alert("Data Saved Successfully");


You can insert the new data using update just the way you could in a phpMyAdmin database,

More info here: