Return to previous page
Posted: Sun Sep 21, 2008 11:35 pm
Can some elaborate on setting this cookie. User Panic was nice enough to show me this but I do not understand and have not seen him online. This code should allow me go go back to a previous page after database query is done so the user does not have to search again, but I don't know where to put this code or how to use it.
if(!$_POST['query'] && $_COOKIE['query'])
{
$_POST['query']=$_COOKIE['query'];
}
else
{
setcookie('query',$_POST['query'],time()+3600,'/');
}
if(!$_POST['query'] && $_COOKIE['query'])
{
$_POST['query']=$_COOKIE['query'];
}
else
{
setcookie('query',$_POST['query'],time()+3600,'/');
}