note 75105 deleted from function.setcookie by nlopess

From: Date: Sat, 12 May 2007 19:00:53 +0000
Subject: note 75105 deleted from function.setcookie by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126463@lists.php.net to get a copy of this message
Note Submitter: satya61229 at gmail dot com ---- setcookie ("name", 'satya', time()+3600*24*(2)); // set the array cookies setcookie("cookie1[0]", "cookiethree"); setcookie("cookie1[1]", "cookietwo"); setcookie("cookie1[2]", "cookieone"); // This will delete all cookie with array cookie set as above foreach ($_COOKIE as $k=>$v) { if (is_array($_COOKIE[$k])) { foreach ($_COOKIE[$k] as $key=>$val) { setcookie($k.'['.$key.']',"", time()+3600*24*(-100)); } } setcookie($k,"", time()+3600*24*(-100)); } http://satya61229.blogspot.com

« previous php.notes (#126463) next »