RE: [PHP] easy cookie question

From: Date: Fri, 14 Sep 2001 00:40:35 +0000
Subject: RE: [PHP] easy cookie question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67288@lists.php.net to get a copy of this message
You need to set the expire time. Set it to 10 years in the future or something. $expire_time = time() + (86400 * 365 * 10); setcookie("cookie", "value", $expire_time); Cheers, Kelly. > -----Original Message----- > From: Jay Paulson [mailto:jpaulson@lbjs.com] > Sent: Friday, 14 September 2001 6:13 AM > To: php-general@lists.php.net > Subject: [PHP] easy cookie question > > > How do you set a cookie not to ever expire even after the browser > is closed? > > I've tried the following: > > setcookie("cookie","value"); > > and when you close the browser it has to set the cookie again, > which i don't > want it to do. > > Thanks, > jay > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#67288) next »