note 29201 deleted from function.setcookie by vincent
| From: | vincent@php.net | Date: | Wed, 10 Sep 2003 18:42:34 +0000 |
| Subject: | note 29201 deleted from function.setcookie by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55975@lists.php.net to get a copy of this message | ||
Note Submitter: geoffrey@nevra.net
----
when trying to set a cookie with path, don't forget the starting / to the path
the following code won't work and will set a cookie for the domain 'example.compath'
(tested with php 4.2.3 and IE 5.5)
setcookie('foo', 'bar', time()+3600, 'path', 'example.com');
the following code will work:
setcookie('foo', 'bar', time()+3600, '/path',
'example.com');
hope it helps