Re: setcookie() is not my friend

From: Date: Thu, 06 Oct 2005 14:21:05 +0000
Subject: Re: setcookie() is not my friend
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-223697@lists.php.net to get a copy of this message
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm testing are set to allow all cookies. I do have a $username and a $_SESSION['username'] that contain the same data.
Well, the stupid/obvious question is: are you checking $_COOKIE('username') like you posted or $_COOKIE['username'], which is syntactically correct? Secondarily, have you set your browser to prompt you when a cookie is sent and, if so, what happens? Larry

« previous php.general (#223697) next »