note 42418 added to function.setcookie
| From: | Bulk at bulksplace dot com | Date: | Sun, 16 May 2004 00:15:09 +0000 |
| Subject: | note 42418 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69656@lists.php.net to get a copy of this message | ||
With regards to what cptnwinky said about cookies being set on windows XP, and the need for a period
(.) in the domain parameter.
I noticed that if you just leave the 'domain' parameter blank, PHP and XP then have no
problem setting the cookie to localhost (or what ever computer name you are using), with out the
need for a period, or a DNS suffix.
Example:
<?php setcookie('cookie_name', 'data', time() + 3600, '/',
''; ?>
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42418
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42418&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42418&report=yes
Search -- http://master.php.net/manage/user-notes.php