Session termination using use CGI::Session; redirection tot eh loginpage doesn't yet work

T

Ted Byers

I finally figured out how to clear the session created using:

my $session = CGI::Session->new('driver:mysql',$query,{ DataSource =>
'dbi:mysql:profitorius',
User =>
'yyyyyyy',
Password =>
'xxxxxxx'});

To do so, I am using:

$session->clear('CGISESSID');
$session->delete();
$session->flush();

my $scriptname = $query->url(-path=>1);
$scriptname =~ s/cgi-bin\/logout\.pl/login\.html/;
print $query->redirect(-location=>"$scriptname",-status=302);
#print $session->header(-location=>$scriptname);

When I do this, the session info goes away, but nothing I do has had
the effect of redirecting the user to the login page. How do I get
this to redirect to the login page?

Thanks

Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top