note 27608 added to function.setcookie

From: Date: Thu, 12 Dec 2002 21:12:35 +0000
Subject: note 27608 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-40811@lists.php.net to get a copy of this message
my cookie does not expire :( how come? i use this script i load it twice but after 20 secs it should stop reloading but it doesnt plz help me whats going wrong <? // Check to see if chocolate chip cookie actually exists. if (isset($_COOKIE["ChocolateChip"])) { // reload page. header("Location: test.php"); // If chocolate chip cookie doesn't exist ... } else { // Set cookie with a value. setcookie ("ChocolateChip","Yummmmmy!", time()+20); // display confirmation and time $exp = time() + 20; echo "sent $exp"; } ?> -- http://www.php.net/manual/en/function.setcookie.php http://master.php.net/manage/user-notes.php?action=edit+27608 http://master.php.net/manage/user-notes.php?action=delete+27608 http://master.php.net/manage/user-notes.php?action=reject+27608

« previous php.notes (#40811) next »