S
superman183
Hi:
I'm trying, with zero success, to set multiple values in a single
cookies ... which I know shouldn't be that difficult at all. However,
whatever I try, it still seems to store only the first value. I'm using
a freebie piece of code from Bewley.net, which is in common usage, and
works fine, except for the fact I don't seem able to store multiple
values:
Here's the piece of code that does the cookie writing:
print "Set-Cookie: ";
print ($name1, "=", $value1, "; expires=", $expiration, "; path=",
$path, "; domain=", $domain, "; ", $secure, "\n");
print "Content-type: text/html\n\n";
However, if I try inserting $name2/$value2, separated from the first
value with a semi-colon, it just doesn't store it ... I even tried just
using plain text values to test it (ie. n=testvalue), but still nothing
.... The first name/value is stored perfectly.
Any ideas appreciated ... I would like to use the same code, rather
than a module, simply because of lack of overhead, although I'm sure
there are a number of modules out there ... I'm really more interested
in why I can't get the code above to work with multiple values.
Thanks in advance!
Superman183 aka. Susan
I'm trying, with zero success, to set multiple values in a single
cookies ... which I know shouldn't be that difficult at all. However,
whatever I try, it still seems to store only the first value. I'm using
a freebie piece of code from Bewley.net, which is in common usage, and
works fine, except for the fact I don't seem able to store multiple
values:
Here's the piece of code that does the cookie writing:
print "Set-Cookie: ";
print ($name1, "=", $value1, "; expires=", $expiration, "; path=",
$path, "; domain=", $domain, "; ", $secure, "\n");
print "Content-type: text/html\n\n";
However, if I try inserting $name2/$value2, separated from the first
value with a semi-colon, it just doesn't store it ... I even tried just
using plain text values to test it (ie. n=testvalue), but still nothing
.... The first name/value is stored perfectly.
Any ideas appreciated ... I would like to use the same code, rather
than a module, simply because of lack of overhead, although I'm sure
there are a number of modules out there ... I'm really more interested
in why I can't get the code above to work with multiple values.
Thanks in advance!
Superman183 aka. Susan