d0353101 has asked for the wisdom of the Perl Monks concerning the following question:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <TITLE> Modify User </TITLE> </HEAD> <BODY> <form name="modifyuser" action="query.cgi" method="get" > <BR> User id : <input type="text" name="lg_name" size=30> Password<input type="text" name="lg_password" size=30> <input type="submit" value="SUBMIT" > </form> </BODY> </HTML>
<BR> #!/perl/bin/perl -wT use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; use DBI; use vivek::session; use CGI::Session; use CGI; my $cgi = new CGI; print $cgi->header; print $cgi->start_html("query.cgi"); my $sid; my $session; my $f_name; my $lg_psswd ; my $lg_name = $cgi->param("lg_name"); print "<BR> lg_name --- $lg_name <BR>"; $session = new CGI::Session(undef, $cgi, {Directory=>'/tmp'}); my $cookie = $cgi->cookie(CGISESSID => $session->id ); print "cookies is : $cookie <BR>" ; print $cgi->header(-cookie=>$cookie); $sid = $session->id(); print "<BR>sid = $sid <BR>"; print $cgi->end_html;
lg_name --- asas cookies is : CGISESSID=f459ae140d01a8ed184d33c689816399; path=/ Set-Cookie: CGISESSID=f459ae140d01a8ed184d33c689816399; path=/ Date: T +hu, 24 Apr 2008 09:13:42 GMT Content-Type: text/html; charset=ISO-8859-1 sid = f459ae140d01a8ed184d33c689816399
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI Session - Refresh Problem
by rhesa (Vicar) on Apr 24, 2008 at 10:37 UTC | |
by d0353101 (Novice) on Apr 25, 2008 at 05:32 UTC | |
by rhesa (Vicar) on Apr 25, 2008 at 12:51 UTC |