note 24552 added to function.setcookie
| From: | martinnitram at excite dot com | Date: | Wed, 21 Aug 2002 08:18:57 +0000 |
| Subject: | note 24552 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35296@lists.php.net to get a copy of this message | ||
Some info about the sub-domain cookie:
Broswer NS4.7 + PHP3.1.18
when set cooike at /~user/test.php (e.g setcookie ('foo', 'me') ),
/~user/dir/test1.php can read it, but seem can't overwrite it, ie, even use
setcookie('foo', 'other') at /~user/dir/test1.php, NS can alert the new value
set (NS set as alert when cookie set), but $HTTP_COOKIE_VARS will always had value $foo=me. If at
/~user/dir/test1.php delete the cookie (setcookie('foo') ), even NS alert than cookie
deleted (NS shown foo=deleted), at /~user/test.php, it can still read this value. If U want a
'global' cookie, just the 4th parameter as '/' (e.g. setcookie('foo',
'me', time()+3600, '/')) and when clear it, use setcookie('foo',
'', -1, '/')
--
http://www.php.net/manual/en/function.setcookie.php
http://master.php.net/manage/user-notes.php?action=edit+24552
http://master.php.net/manage/user-notes.php?action=delete+24552
http://master.php.net/manage/user-notes.php?action=reject+24552