note 50303 added to features.cookies
| From: | PowowVN at yahoo dot com | Date: | Thu, 24 Feb 2005 10:25:01 +0000 |
| Subject: | note 50303 added to features.cookies | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85474@lists.php.net to get a copy of this message | ||
How to change value of cookie?
I have cookie name 'abc' with value 'abc'
This is code:
$abc = @$HTTP_GET_VARS['abc'];
if(!isset($abc)) {
}else if($abc == "xyz"){
if (isset($_COOKIE["abc"])){
@setcookie('abc', '', time()-60*60*24*2);
@setcookie('abc', 'xyz', time()+60*60*24*2);
}
} else if ($abc == "en" ) {
@setcookie('abc', 'en', time()+60*60*24*2);}
Why value of cookie name 'abc' cann't change when I type ?abc=xyz
Please tell me how to click a link for change value of cookie?
----
Manual Page -- http://www.php.net/manual/en/features.cookies.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50303
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50303&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50303&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50303&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50303&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50303&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50303&report=yes
Search -- http://master.php.net/manage/user-notes.php