Problem with Array Cookies
| From: | Rubén Gutiérrez | Date: | Fri, 22 Sep 2000 03:13:14 +0000 |
| Subject: | Problem with Array Cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17212@lists.php.net to get a copy of this message | ||
Hey,
I'm having some problems to set array cookies. I'm trying to set a
cookie named "CookieSeE" with three different values: City, Email and
Name, so I do something like this:
setcookie ("CookieSeE[city]", "$city");
setcookie ("CookieSeE[email]", "$email");
setcookie ("CookieSeE[name]", "$name");
But instead of setting one cookie with three different values, I get 3
different cookies. One named "CookieSeE[city]" another one named
"CookieSeE[email]" and one named "CookieSeE[name]".
I currently use an ASP script to do this, but I'm migrating to PHP and
I'd like to be able to read and re-write the old cookies. This is the
cookie I get with the ASP script (in IE4):
CookieSeE
CITY=Some+City&EMAIL=name%40email.com&NAME=Ruben
www.mydomain.com/
0
1162086400
30050975
661917440
29367610
*
One cookie with three values. But with PHP3 (PHP/3.0.16 for Windows) I
get three cookies:
CookieSeE[city]
Some+City
www.mydomain.com/
0
4120648448
29442137
3836978016
29368679
*
CookieSeE[email]
name%40email.com
www.mydomain.com/
0
4120648448
29442137
3836978016
29368679
*
CookieSeE[name]
Ruben
www.mydomain.com/
0
4120648448
29442137
3836978016
29368679
*
Do Array Cookies work with PHP3? What's wrong with what I'm doing?
According to the manual what I'm doing is right, but it doesn't seem to
work. Any suggestions?
Cheers,
Rubén Gutiérrez
[ http://www.nnyc.com.ar ]
[ http://www.snpp.com.ar ]