Page 1 of 1

COOKIE

Posted: Wed Dec 25, 2002 1:55 pm
by jamal
Hi Guys,
Please I wondered why this code did not print anything.
I tried to run several times but I did not get a reply.
Please help me out.
Thanks in Advance

Code: Select all

<? 
if ($MODE!=="test") { 
        SetCookie("COOKIE", "VALUE"); 
        Header("Location: ".$SCRIPT_NAME."?MODE=test"); 
        exit; 
} else if ($COOKIE=="VALUE") { 
        echo "Cookies are enabled"; 
} else { 
        echo "Cookies are disabled"; 
} 
?>

Posted: Wed Dec 25, 2002 2:42 pm
by mydimension
my guess is you should be reading this: viewtopic.php?t=511