I am using following code for a refreshing page, it is not reloading on completion. The following code is not working sometime.
$url = array("www.yahoo.com","www.gmail.com");
$go=$url[0];
header("Refresh: 10; URL=$go");
I am using following code for a refreshing page, it is not reloading on completion. The following code is not working sometime.
$url = array("www.yahoo.com","www.gmail.com");
$go=$url[0];
header("Refresh: 10; URL=$go");
"www.yahoo.com" may work in most browsers, but it's not a proper URL without the scheme.
Try http://www.yahoo.com/
etc. instead.
Additionally, redirects via header()
are usually done with a Location:
header, not a non-standard Refresh:
. A refresh is best supported as a meta tag, not a header.