setcookie().. how to retrieve data afterward?
| From: | Andrew Rose | Date: | Sun, 01 Apr 2001 18:17:34 +0000 |
| Subject: | setcookie().. how to retrieve data afterward? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-46512@lists.php.net to get a copy of this message | ||
Ive been playing with setcookie() and am stuck with trying to re-pull the
infomation I set, I use:
setcookie ("user_id", $userid, 1, "", "", 1);
to set the cookie and:
if(isset( $user_id )){
echo " cookie 'user_id': $user_id\n";
} else
echo" no cookie set ...\n";
}
to see if its there.. now this is the closest Ive seen anyone else do it and
to me it dosnt make much sense at all the code for retrieving.. also it
dosnt work.. suprise suprise.. so anyone know how to do this?
thanks in advance
-Andrew Rose