How to refresh a page?

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

That'll refresh to example.php in four (4) 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 4 seconds forever (not suggested) then :

  • 17 Users Found This Useful
Was this answer helpful?

Related Articles

I'm new to PHP, where should I start?

You can refer the following link to understand about PHP code,The official PHP web site as a lot...

I have starting to know a bit of PHP, now how do I...?

---------------------------Introductory PHP Tutorials :---------------------------(in no...

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...

How can I call a command line executable from within PHP?

Check out the "Program Execution functions" here :...