spewn
Programmer
- May 7, 2001
- 1,034
here's my code:
everything is fine the first go around, but it seems as though there is a default expiration because after a couple hours, my site "logs" me out and i'm back to the login page. after that, i can't seem to get a new session stored, as I'm using $sSid and checking the session value - it keeps changing. unless i completely close my browser and start a new session, it doesn't hold a new session.
i did the empty check and printed out the "your session is empty", which showed me that the session was empty, and so using the conditional I tried to create the new session, but it doesn't seem to take hold, as I'm not able to login.
any help here is appreciated.
- g
Code:
use CGI::Session;
$session = CGI::Session->load();
if ($session->is_empty) {
#print $session->header();
#print "your session is empty";
$session = $session->new();
}
$sSid = $session->id();
everything is fine the first go around, but it seems as though there is a default expiration because after a couple hours, my site "logs" me out and i'm back to the login page. after that, i can't seem to get a new session stored, as I'm using $sSid and checking the session value - it keeps changing. unless i completely close my browser and start a new session, it doesn't hold a new session.
i did the empty check and printed out the "your session is empty", which showed me that the session was empty, and so using the conditional I tried to create the new session, but it doesn't seem to take hold, as I'm not able to login.
any help here is appreciated.
- g