Page 1 of 1

newbie - page automatic redirection

Posted: Thu Dec 03, 2009 9:34 am
by kingdm
Good day everyone,

I'm new in php (just a few weeks ago), I have a question. I'm curious on how to do the redirecting page. Say I want my logout to automatically redirect into index in 3 seconds. Here is my logout code. Can someone guide me.

Code: Select all

<?php 
 
session_start(); 
unset($_SESSION['id']); 
unset($_SESSION['username']); 
unset($_SESSION['password']); 
     
session_destroy(); 
 
$display = "<center>" . "<br /><br /><br /><br/><br /><br /><br /><br/><br /><br />" . "<div id=\"stylized\" class=\"myform\"><br/><br /><br /><h1>You have successfully logout</h1>" . "<p></p>" . "<a href=\"index.php\"><img src=\"images/back.png\" align=\"center\" border=\"0\" /></center></a></div>" . "</center>"; 
 
?> 
<html> 
<head> 
<link rel="stylesheet" type="text/css" href="confirmation_style.css"  /> 
</head> 
<body> 
 
<?php echo $display;?> 
 
</body> 
</html>

Re: newbie - page automatic redirection

Posted: Thu Dec 03, 2009 9:40 am
by jackpf

Re: newbie - page automatic redirection

Posted: Thu Dec 03, 2009 9:47 am
by kingdm
Thanks for the quick reply jackpf. I have it working great. Cheers mate.

Re: newbie - page automatic redirection

Posted: Thu Dec 03, 2009 4:33 pm
by jackpf
Not really like i did anything.... :p
:google: