Can't change a cookie

From: Date: Thu, 29 May 2003 22:30:06 +0000
Subject: Can't change a cookie
Groups: php.general 
Request: Send a blank email to php-general+get-149500@lists.php.net to get a copy of this message
Help, I'm trying to change a cookie to whatever is submitted as a URL parameter called 'aid.' But once it's set the first time, I can't get it to overwrite it next time the 'aid' parameter is received. How do I make this work? Here is my code: <?php if ("$aid" != "") { setcookie("aid", $aid, time() + 31536000, "/", ".mydomain.com", 0); } else { $aid = $_COOKIE['aid']; } ?>

« previous php.general (#149500) next »