note 21999 deleted from function.setcookie by dams
| From: | dams@php.net | Date: | Fri, 28 Jun 2002 01:48:47 +0000 |
| Subject: | note 21999 deleted from function.setcookie by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-32355@lists.php.net to get a copy of this message | ||
i have a problem with cookies under win32 PHP 4.2.1. when i send three cookies in one page after one
by one, only the last will be set, i check them in the next page. here is the code:
setcookie("c_authed", "OK", time()+3600);
setcookie("c_afadmin", "1", time()+3600);
setcookie("c_afkod", "1", time()+3600);
header("Location: index_authed.php");
and i read them in the first lines of index_authed.php:
echo "|".$HTTP_COOKIE_VARS[c_authed]."|\n";
echo "|".$HTTP_COOKIE_VARS[c_afadmin]."|\n";
echo "|".$HTTP_COOKIE_VARS[c_afkod]."|\n";
it generates this output:
||
||
|1|
if i swap the lines, every time only the last cookie variable will be set (with correct,
corresponding value).
the problem is, so, it is not working in win32 PHP 4.2.1 but the _exactly same code_ works under
linux, PHP 4.0.3.