cookie problems
Posted: Thu Jun 13, 2002 4:33 pm
Ok, im having trouble retrieving info from a cookie...
here is how the cookie was set:
setcookie("loggedin['username']", "$username", time()+36000);
and after its set, i tried to do:
echo "welcome <b>".$loggedin['username']."</b><br />";
and it returns "welcome "
I also tried:
echo "welcome <b>".$HTTP_COOKIE_VARS['loggedin']['username']."</b><br />";
same problem...(i can't use $_COOKIE, my host hasn't upgraded)
what am i doing wrong?
here is how the cookie was set:
setcookie("loggedin['username']", "$username", time()+36000);
and after its set, i tried to do:
echo "welcome <b>".$loggedin['username']."</b><br />";
and it returns "welcome "
I also tried:
echo "welcome <b>".$HTTP_COOKIE_VARS['loggedin']['username']."</b><br />";
same problem...(i can't use $_COOKIE, my host hasn't upgraded)
what am i doing wrong?