RE: [PHP] cookies

From: Date: Thu, 17 Aug 2000 13:30:07 +0000
Subject: RE: [PHP] cookies
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12217@lists.php.net to get a copy of this message
Kurth, Try this for multiple values: setcookie ("cookie_name", $firstname."^".$lastname, time()+3600, "/"); Then when you read the cookie: $cookie_array = explode ("^",$HTTP_COOKIE_VARS[cookie_name]); $firstname = $cookie_array[0]; $lastname = $cookie_array[1]; The ^ can be any character that would not appear in the values. Robert -----Original Message----- From: Kurth Bemis [mailto:kurth@usaexpress.net] Sent: Thursday, August 17, 2000 7:43 AM To: php-general@lists.php.net Subject: [PHP] cookies i'm wondering how its possible to put multiple values into one cookie? like i want to store $firstname and $lastname. i tried putting special chars in between them and all i get a parse errors.....i know how to split the values apart once i get them in the cookie...but i need to get the multiple values in one cookie first...any ideas? ~kurth Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer kurth@usaexpress.net http://www.usaexpress.net/kurth ICQ - 6624050 Call Sign - N1TYW PGP key available - http://www.usaexpress.net/kurth/pgp Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#12217) next »