1

I need to be able to have my main page (index.php) check every 10 seconds for a change in the mysql database table 'refresh'. If the 'refresh' value is 1 it needs to refresh the page in its entirety. If the value is zero it does nothing. I would use meta-refresh but I cannot have the page always refreshing as the page has a slider and it would mess up the rotation. Please let me know what you think of! Thanks in advance!

1
  • search for ajax long polling
    – wordpressm
    Dec 24, 2013 at 5:07

1 Answer 1

3

Use AJAX to check if an update is required.

http://api.jquery.com/jQuery.ajax/

You should learn the basic how to's of AJAX before using something like jQuery when you don't even know what's going on.

1
  • Could you provide me some example code. Dec 24, 2013 at 16:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.