in reply to Re: Cookie->fetch problem
in thread Cookie->fetch problem
sub ProcessLoginRequest { my ($query) = @_; my $status = 0; # $sessionname = 'CGISESSID'; # my %cookies = CGI::Cookie->fetch; # my $sid = $cookies{$sessionname}->value; my $sid = GetUserSessionCookie(); warn("ProcessLoginRequest Query: '$query'"); warn("ProcessLoginRequest SID from cookie: '$sid'"); #Check if it got valid return from fetch cookie if ($sid ne 0){ $status = 1;
But later I compare against the stored session ID.
Thanks#--------------------------------------------------------------------- +---------- # FUNCTION: OpenSession($dbh, $sid) # Opens existing session or creates new depending on $sid #--------------------------------------------------------------------- +---------- sub OpenSession{ my ($dbh, $sid)= @_; $session = new CGI::Session("driver:MySQL", $sid, {Handle=>$dbh, Lo +ckHandle=>$dbh}); return $session; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Cookie->fetch problem
by Eily (Monsignor) on Mar 09, 2017 at 16:31 UTC | |
by tultalk (Monk) on Mar 09, 2017 at 17:06 UTC | |
by kennethk (Abbot) on Mar 09, 2017 at 17:22 UTC | |
by Eily (Monsignor) on Mar 09, 2017 at 17:15 UTC | |
by tultalk (Monk) on Mar 09, 2017 at 18:43 UTC | |
by kennethk (Abbot) on Mar 09, 2017 at 19:00 UTC | |
by tultalk (Monk) on Mar 09, 2017 at 18:30 UTC |