Page 1 of 1
How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 6:11 am
by Gunner
How to Refresh a Page Using PHP?
I have been searched all over the search engine, but I cannot find the spesific answer. I hope IRC (Indie-Resource Community) know this case..
Thanks!
-Gunner
Re: How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 6:20 am
by SpiritWebb
Code: Select all
<META HTTP-EQUIV=Refresh CONTENT="3; URL=http://www.yoursite.com/yoururl.php">
This will refresh the page every 3 seconds
Re: How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 6:37 am
by Jackolantern
For the record, meta refreshes are legacy, and are now discouraged by the W3C. Instead, they suggest to do it through Javascript, where you can have much more control over the refresh (such as pausing refreshes when the user starts trying to interact with a form element, etc.).
However, you are correct that meta-refreshes are the only method of causing page refreshes in PHP

Re: How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 6:55 am
by SpiritWebb
sshh..dont care W3C!!

Re: How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 9:48 am
by Gunner
Hi,
Thank you for your answer!
But what I'm looking is to refresh page once. Because in my game, I used profile description. Whenever user submit their new description, the description is same as before. So I need a PHP script to refresh it automatically

Re: How to Refresh a Page Using PHP?
Posted: Sun Nov 27, 2011 6:52 pm
by Xaleph
That`s a workaround, not a solution. What you need to do is start retrieving data AFTER forms are handled and updated. That way you don`t need refreshes.