Re: Session's Cookie Lifetime

From: Date: Fri, 10 Nov 2000 22:28:15 +0000
Subject: Re: Session's Cookie Lifetime
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-24732@lists.php.net to get a copy of this message
Here is an example: <?php // In this example, the cookie lasts for 30 minutes. Change the number of seconds (1800) for the amount you want. $lifetime = time() + 1800; setcookie("cookiename",$variable,$lifetime); ?> Best regards, Fábio Ottolini Eletronic.Net ----- Original Message ----- From: "jeremy brand" <jeremy@nirvani.net> To: "Matt" <matt@smokescreen.org> Cc: <php-general@lists.php.net> Sent: Friday, November 10, 2000 8:00 PM Subject: Re: [PHP] Session's Cookie Lifetime > I can't speak specifically about PHP4 sessions -- because I use > j-sessions, but you can set a cookie to live however long you want. > > -jeremy brand > > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for > more > --------------------------------------------------------------------- > We cannot do everything at once, but we can do something at once. > -- Calvin Coolidge > > On Fri, 10 Nov 2000, Matt wrote: > > > Date: Fri, 10 Nov 2000 16:50:12 -0500 > > From: Matt <matt@smokescreen.org> > > To: php-general@lists.php.net > > Subject: [PHP] Session's Cookie Lifetime > > > > On my server we don't and can't have sessions startging automaticly when a > > person comes to visit the site. After or when I run session_start() is there > > some way that I can specify how long I want the cookie with the session_id > > to stay on their computer. In other words, I want them to stay "logged in" > > for a month after they first log in and not log off when they close the > > browser. > > > > --Thanks > > > > > > -- > > 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 > > > > > > > -- > 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 (#24732) next »