cookie

From: Date: Fri, 20 Jun 2003 16:15:15 +0000
Subject: cookie
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18866@lists.php.net to get a copy of this message
Hi, i've Got a question, when i'm sending two cookies and on the other site tries to read values, only second cookie value is enable. It looks like the php is sending only last cookie. My php version is 4.2.2. Maybe it'c configuration manner, please, help... <? //the following code prevents the page from being cached header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 //set the cookies setcookie("fname","Frank",time()+3600); setcookie("lname","Boumphrey"); ?> <html> <title>PHP Cookies 1</title> <p>Setting cookies</p> <?php echo $ _COOKIE["fname"].", ".$_COOKIE["lname"]; ?> </html> stanislaw wozniak

« previous php.mirrors (#18866) next »