#21750 [Opn->Bgs]: Setcookie with array

From: Date: Mon, 20 Jan 2003 00:08:51 +0000
Subject: #21750 [Opn->Bgs]: Setcookie with array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30599@lists.php.net to get a copy of this message
ID: 21750 Updated by: iliaa@php.net Reported By: mitya@alesh.ru -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux Red Hat PHP Version: 4.3.0 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you want cookie to be set for directory other then current provide the path parameter to setcookie() as the 4th argument. Previous Comments: ------------------------------------------------------------------------ [2003-01-19 10:42:51] mitya@alesh.ru Hi there! When i trying to set cookie it doesn't works! the code while (list($key, $value) = each ($_GET["orderformresult"])) { if(empty($order[$key])){ setcookie("order[".$key."]",""); setcookie ("order[".$key."]",$value,time()+3600); }else{ setcookie ("order[".$key."]",$value,time()+3600); } } So , the code is right, it works, but ONLY in that directory where the cookie was setted. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21750&edit=1

« previous php.bugs (#30599) next »