Posted by Chris Hope on 08/16/07 21:05
laredotornado@zipmail.com wrote:
> 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
You would need to change the cookie that is set to have an expiry 24
hours from now. Session cookies are set to have an expiry of the
current time (or earlier) and are lost when the browser is closed. If
the cookie's expiry is set some time into the future it will persist
even if the browser is closed.
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Navigation:
[Reply to this message]
|