How to refresh a page?

To do a refresh, you can use HTML meta tag such as :

 [META HTTP-EQUIV=Refresh CONTENT='10; URL=example.php']

Change the brackets to the obvious brackets, [ become <
That'll refresh to example.php in ten (10) seconds. It's also worth
mentioning that various predefined variables exist that reflect the
current page, run phpinfo() to see which exist on your system.
A commonly used one is called as $PHP_SELF For example, let's say we
wanted to refresh a page every 10 seconds forever (not suggested :-)
then :

if ($_POST['go'])

$url = $_POST['url'];

echo "content='4; url=$url'>";


Change the brackets to the obvious brackets, [ become < for PHP tag

Was this answer helpful?

 Print this Article

Also Read

What is the essence of PHP encryption(using crypt(),mcrypt(),etc)if data on transit isn't safe?

The apathetic response is, of course, "there is no point." If you allowed a login over normal...

Why i couldn't fetch my variable from the form?

Register_Globals directive is set to OFF because of potential security issues.  PHP has this...

How can I take a list and make each row a value in an array?

If you have a text file that looks like this : john|orange|cow sam|green|goat...

How to send email using PHP script?


What's the best way to start writing a PHP program?

Firstly figure out, on paper, exactly what you want to do. Otherwise, you'll just be coding...