How to Refresh a web page or redirect to another page
by Scud Wednesday, August 30, 2006
Rating:
Vote this news:
There are many useful functions in PHP. Refresh function is a real focus and helps to us to redirect apage or refresh page itself. Let's see it in action.
Sample Code - Refreshing a single page :
Sample Code - Refreshing a single page :
<?php
header("Refresh: 10;");
?>
This simple code refreshes the page in every 10 seconds. If you wish to refresh page in different times, just play with secound.
Sample Code - Refreshing and redirecting a page : <?php
header("Refresh: 10; url=http://www.dotnetindex.com/read.asp?articleID=3011");
?>
Yes, ths is a cool function. Page will be displayed in 10 seconds and later will redirect to another page.



