I am storing a number in a MySql Database Table, specifically a row called “open” whose field is an integer value that nearly continuously changes. I want to be able to continuously pull this value and display it on the frontend HTML page and put it in a table, called something like “live values”. I want the numbers on the frontend to change without need for page refresh and I am trying to figure out how/if I can do this.
Is it possible to pull the value of the data to the frontend, using PHP, asynchronously?
You need to program a little bit of JavaScript in the HTML itself, which will periodically poll a PHP page. This PHP page should access the MySQL DB, retrieve the number, and send it back.
Here’s Google AJAX tutorial which might help you: http://code.google.com/edu/ajax/tutorials/ajax-tutorial.html
Simpler PHP + AJAX examples:
http://simpletutorials.com/?path=tutorials/javascript/simple_ajax
http://www.w3schools.com/php/php_ajax_database.asp