blmg2009 Posted October 1, 2014 Share Posted October 1, 2014 Hi there I'm a little bit of a newbie when it comes to PHP, and I have tried to find my answer on google and on other websites related to php development. My question is what do I need to be researching / learning to automatically update a page with content. For example, if I have a database field called breaking news and this text string is flashed at the bottom of the screen on a scrolling bar. When the field changes value in MYSQL, I would like the page to automatically update the page without a need for a page refresh. All I need is some advice on what I need to search for in order for me to learn the coding myself. I'm thinking AJAX, but not too sure. Thank you for reading. Quote Link to comment https://forums.phpfreaks.com/topic/291386-live-page-updates/ Share on other sites More sharing options...
Solution Jacques1 Posted October 1, 2014 Solution Share Posted October 1, 2014 (edited) There are various techniques to implement this. The easiest way is to update the page every n seconds using Ajax. For example, every 5 seconds you would fetch the current text from the server and insert it into the page. It's also possible to actively push the new content to the client, but this is harder to implement and comes with various issues, so it's not recommended unless you specifically need “real time” updates. Edited October 1, 2014 by Jacques1 Quote Link to comment https://forums.phpfreaks.com/topic/291386-live-page-updates/#findComment-1492502 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.