Problem: I've created a valid session from the another login page. However, when I place the above code at type of another page, it always evaluates to an empty session. I've seen another post similar to this one and not one really answered the question. Is there some conspiracy against using Perl for session management? Should I just throw my hands up and use PHP Session_Start()?use strict; use CGI::Session; use CGI; use CGI::Cookie; print "Content-type: text/html\n\n"; my $cgi = new CGI("CGISESSID"); my $session = CGI::Session->load or die CGI::Session->errstr; print $session->header; if ($session->is_expired) { print $session->header, $cgi->start_html, $cgi->p("Your session timed out. Click here to start a new sessio ++n."), $cgi->end_html; exit(0); } if($session->is_empty) { print $cgi->start_html; print "Click here to sign in"; print $cgi->end_html; exit(0); } print "</body>"; print "</html>";
In reply to Re^2: accessing session variables across different pages
by s/^Perl/pain/i
in thread accessing session variables across different pages
by s/^Perl/pain/i
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |