You are here: Re: how to keep a session variable alive across browser closings « PHP Programming Language « IT news, forums, messages
Re: how to keep a session variable alive across browser closings

Posted by gosha bine on 08/17/07 00:42

laredotornado@zipmail.com wrote:
> Hi,
>
> When a user logs into our site, we create a session variable to denote
> the session is active and another to denote who is logged in. Once
> the user closes the browser and re-opens it, the session is destroyed
> and the variables are gone.
>
> How can I keep the session alive for 24 hours even if the user closes
> and re-opens the browser?
>
> I'm using PHP 4.4.4. Thanks, - Dave
>

The whole purpose of sessions is to keep short-term data until the
"connection" is closed. If you need persistence, create a normal,
long-term cookie via setcookie() and read it from the $_COOKIES array.

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация