note 75105 added to function.setcookie
| From: | satya61229 at gmail dot com | Date: | Sat, 12 May 2007 13:38:22 +0000 |
| Subject: | note 75105 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126460@lists.php.net to get a copy of this message | ||
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
----
Server IP: 203.199.114.50
Probable Submitter: 61.8.137.98
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- https://master.php.net/note/edit/75105
Del: integrated -- https://master.php.net/note/delete/75105/integrated
Del: useless -- https://master.php.net/note/delete/75105/useless
Del: bad code -- https://master.php.net/note/delete/75105/bad+code
Del: spam -- https://master.php.net/note/delete/75105/spam
Del: non-english -- https://master.php.net/note/delete/75105/non-english
Del: in docs -- https://master.php.net/note/delete/75105/in+docs
Del: other reasons-- https://master.php.net/note/delete/75105
Reject -- https://master.php.net/note/reject/75105
Search -- https://master.php.net/manage/user-notes.php