note 34612 deleted from function.setcookie by vincent

From: Date: Wed, 10 Sep 2003 18:48:48 +0000
Subject: note 34612 deleted from function.setcookie by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55983@lists.php.net to get a copy of this message
Note Submitter: randy (singlesaints com) ---- For login cookies, a mistake that I made, to the dismay of my users, was setting the cookie as follows: setcookie("username", "$username", time()+315360000, "/", "www.mydomain.com"); instead of just setcookie("username", "$username", time()+315360000, "/", "mydomain.com"); or even just setcookie("username", "$username", time()+315360000); While 95% of my users had no problems, a select few must have been neglecting to type "www" before the domain, and the cookies refused to set. My mistake, but man it took forever to find.

« previous php.notes (#55983) next »