in reply to how to clear cgi object from session?
then on body.pl :main.pl : my $cgi = New CGI; my $session = new CGI::Session(); $cgi->param("name", "Barney"); $session->save_param($cgi); #saves cgi object into session $cgi->redirect(URI => "body.pl?sessionid=".$session->id);
Then on car.pl :my $cgi = New CGI; my $sessionid = $cgi->param("sessionid"); my $session = new CGI::Session($sessionid); $session->load_param($cgi); $cgi->param("name"); #we still have barney around. $session->clear($cgi); #ASSUMPTION - CLEAN UP CGI $cgi->redirect(URI => "car.pl?sessionid=".$session->id);
my $cgi = New CGI; my $sessionid = $cgi->param("sessionid"); my $session = new CGI::Session($sessionid); $session->load_param($cgi); print $cgi->param("name"); #should not have anything anymore
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to clear cgi object from session?
by almut (Canon) on Sep 14, 2007 at 13:04 UTC |