|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-18 05:48 UTC] schulte at delta7 dot de
I'm using PHP4.0.1.pl2
i tried this example out of the PHP3-Manual (section setcookie)
--> i need to store more than on value in my script.
here is the code I used
-----
setcookie ("cookie[three]", "cookiethree");
setcookie ("cookie[two]", "cookietwo");
setcookie ("cookie[one]", "cookieone");
if (isset ($cookie)) {
while (list ($name, $value) = each ($cookie)) {
echo "$name == $value<br>\n";
}
}
----
so far no error occurs, but i can see only the last cookie this script wrote to by browser (netscape 4.6/4.7).
You can also try to write separate cookies , but only the last is accepted.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 11:00:01 2025 UTC |
seems to be another error related to roxen sapi and cookies ... PS: bug report form should have a sapi input fieldthis could be because your server is only sending one cookie to browser Try creating a script like the one below... <? setcookie ("cookie1","helloworld"); setcookie("cookie2","ilovetheworld"); setcookie("cookie3","phprocks"); phpinfo(); ?> go down to the section about the "HTTP Headers Information" then go to the "HTTP Response Headers." Either post this information here, or give us the address to that page.