Muggin Posted December 16, 2006 Share Posted December 16, 2006 I have a simple page that displays the content of a database but I need it to refresh automatically when new entries are submitted. I have tried searching for different tutorials, all of which either do not explain it well enough or it plain do not work, with comments to back it up. I would like to now your take on how to go about doing something like this. ~Thanks in advance Quote Link to comment Share on other sites More sharing options...
fert Posted December 16, 2006 Share Posted December 16, 2006 http://www.phpfreaks.com/quickcode/Redirect/532.php Quote Link to comment Share on other sites More sharing options...
Muggin Posted December 16, 2006 Author Share Posted December 16, 2006 No, I think you are misunderstanding me. I have a form that submits peoples user names and password to a database. I also have a page that displays these submissions. I need to find a way to have the results page automatically refresh when the database is updated. Not refresh at a given time.~Thanks Quote Link to comment Share on other sites More sharing options...
bljepp69 Posted December 16, 2006 Share Posted December 16, 2006 PHP is server side. Once it loads the page, PHP really has no way to refresh the browser page. I don't know AJAX, but I believe you can use it to call server side functions without refreshing the browser window. You might be able to use this to run a check every so often to see if the db has been updated and then refresh the browser window, or at least the relevant portions of the browser window. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted December 16, 2006 Share Posted December 16, 2006 Your solution would be AJAX with a javascript timer checking periodically for new entries in the DB. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.