COOKIE

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamal
Forum Commoner
Posts: 57
Joined: Sat Oct 26, 2002 7:53 pm
Location: London

COOKIE

Post 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"; 
} 
?>
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

my guess is you should be reading this: viewtopic.php?t=511
Post Reply