PHP 4.0 Bug #5653: with setcookie(), only the last cookie is written

From: Date: Tue, 18 Jul 2000 09:48:34 +0000
Subject: PHP 4.0 Bug #5653: with setcookie(), only the last cookie is written
Groups: php.dev 
Request: Send a blank email to php-dev+get-24857@lists.php.net to get a copy of this message
From: schulte@delta7.de Operating system: Linux PHP version: 4.0 Release Candidate 2 PHP Bug Type: Session related Bug description: with setcookie(), only the last cookie is written 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.

« previous php.dev (#24857) next »