View Full Version : refresh page
Tidus
08-17-2002, 02:35 PM
Hello!
Is there any php function to refresh the page you are currently on?
Thanks
Simple answer = NO
PHP is executed on the server (not at the client's end), therefore any page refresh would negate the parsing of the initial page.
I'd suggest either meta tags or javascript. As I always forget the syntax for thhe metas, I can only list a few javascript ways.
document.location.replace("thepage.php");
document.location.href = "thepage.php";
You could just echo out a short script....
if($a < 0) {
echo '<script language="javascript">setTimeout(\'document.location.replace("'.$PHP_SELF;.'")\',3000);</script>';
}
which would effect a page replace after 3 seconds if the php variable $a was less than zero.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.