Can't change my cookies!

From: Date: Thu, 22 May 2003 20:36:43 +0000
Subject: Can't change my cookies!
Groups: php.general 
Request: Send a blank email to php-general+get-148638@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 (#148638) next »