View Full Version : continually refreshing a PHP page without reloading the page?

04-18-2004, 09:26 PM
Is it possible for a php page to continue refreshing the content without actually reloading the whole page?

i.e. i have a table in MySQL that is continually being updated. A php page messages.php connects to the database and then displays the messages within the table, then it checks the database again and displays the messages and then checks the database again.....etc....etc. without using the meta tags or javascript to reload the page.

Does anyone have anyideas? I thought of trying to use a loop function to continually loop through the connect, write, disconnect part, but this didn't work (but that may be because my code was wrong)

Many thanks in advance,

04-18-2004, 10:01 PM
You could use a framepage or an iframe and only load a part of the page.
But the reload needs to be initialised clientsided (using javascript or metatags)

Within an http protocol, you can not push content to the client, the client can only pull it in from the server. So you'd need to mix in some other protocol to be able to push it.

04-18-2004, 10:27 PM
Thanks for the reply.

I'm already using frames to do what you've just said, but the problem is that it appears to blink everytime that the javascript function is called to refresh the page, I was just trying to get around the problem of it blinking.


04-19-2004, 01:04 PM
Perhaps this is useful ...