I get the value of $_SESSION[balance] from a MySQL database on every login. How can I update the value in clients browser without reloading the page every 5 minutes? I think it can possibly be done using AJAX?
Sorry if that’s too vague I’m absolutely clueless as to where to start on this.
your’re right, you need AJAX for this. easiest way is to use
$.get();with the jQuery libraryjs/jQuery script
in
script.phpyou simply query the database for the balance and echo it