note 25805 added to function.setcookie
| From: | markus at rack1 dot php dot net | Date: | Mon, 07 Oct 2002 11:25:16 +0000 |
| Subject: | note 25805 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37738@lists.php.net to get a copy of this message | ||
After getting mad on a Opera 6 message, that "my cookie couldnt be set of security
reasons" ... cause i "havent had a valid IP for my domain" ... as i am using an
apache with several virtual hosts on one IP, i found out, that you do not need to set a Domain, if
you only need a temporary cookie without expiration:
$dom = www.yourdomain.com
setcookie("com_user", "$chatuser", "", "/",
"$dom");
WONT work on opera6 with virtual hosts .. but:
setcookie("com_user", "$chatuser", "", "/");
WILL work!
Remember that you need the "/" if you want to use the cookie in the subdirectories ...
--
http://www.php.net/manual/en/function.setcookie.php
http://master.php.net/manage/user-notes.php?action=edit+25805
http://master.php.net/manage/user-notes.php?action=delete+25805
http://master.php.net/manage/user-notes.php?action=reject+25805