if(!isset($_COOKIE["user"]))
{
$expire=time()+60*60*24*30;
setcookie("user", "Alex Porter", $expire);
//cookie for 5 mins
$time = time()+60*5;
setcookie("page_auth", "Alex Porter", $time);
}
else
{
if(isset($_COOKIE["page_auth"]))
{
header('location:timeout.php');
setcookie("user", "", time()-3600);
}
}