note 28379 deleted from function.setcookie by vincent

From: Date: Wed, 10 Sep 2003 18:41:41 +0000
Subject: note 28379 deleted from function.setcookie by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55973@lists.php.net to get a copy of this message
Note Submitter: sjohnson -AT- fuzzygroup.com ---- It sounds like you need to set the expiration date for the cookie. Try this: setcookie("tekka_p","HOWDY_DOO",time() + 86400); This would set the cookie's expiration date to one day from the time it is set. If you have the time period for the cookie declared in a variable make sure that it is valid for the current scope. I had time()+$cookie_period but $cookie_period was Null in that scope so my cookies were set and then immediately vanished. Those cookies did not taste good at all. Kinda Cement + Chocolate Chip. Icky.

« previous php.notes (#55973) next »