note 25805 deleted from function.setcookie by john

From: Date: Sat, 30 Nov 2002 16:42:02 +0000
Subject: note 25805 deleted from function.setcookie by john
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40181@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 ...

« previous php.notes (#40181) next »