...

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



Badman3k
04-18-2004, 08: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,

raf
04-18-2004, 09: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.

Badman3k
04-18-2004, 09: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.

Thanks,

Mhtml
04-19-2004, 12:04 PM
Perhaps this is useful ...
http://www.codingforums.com/showthread.php?t=16205



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum