I want to my page get autoupdate in PHP

Asked By 0 points N/A Posted on -

Hi experts,

I am newbie in PHP and developing a web page. I want that my page update automatically when I made changes in the database. I am looking for autoupdate in php. I am finding a way how doing this. Can you provide me a code to help me out? I want that my PHP page always keeps checking the database, If any update available, then entire page should be auto  updated.

Best Answer by Alice R Jones
Answered By 10 points N/A #166650

I want to my page get autoupdate in PHP


If you use window.setInterval() and jQuery's .load() you should be able to do what you want.
The PHP script should return the HTML that needs to replace the previous one.

Another basic example code:Attached

Hope to enjoy it.
Thanking you
Franke Mary

Best Answer
Best Answer
Answered By 0 points N/A #166651

I want to my page get autoupdate in PHP


Hi Teo,


If your database is in MySQL Server then you need to use MySQL Functions that are available to use with PHP code. In all there are 3 API that PHP provides for accessing the data using MySQL. You need to be clear as to which one to use for your script. The PHP API’s are mysql, mysqli, and PDO extensions. All you need is to grab the last modified entry from MySQL database and show it through PHP on your database. It would simply execute the php page using the API and not update the page automatically.




Login/Register to Answer

Related Questions