in reply to Re: Sessions problems
in thread Sessions problems
Should the value for $cgi at:if($ENV{REQUEST_METHOD} eq 'POST') { $q = new CGI; $username = $q->param('user_name'); $pword = $q->pword'pwd'); } ##### validate username and pword ##### my $cgi; #Create a new session $session = new CGI::Session("driver:File", undef, {Directory=> +'./tmp/sessions'}); #Allow cgi-session read the cookie at the next reques $cookie = $q->cookie( -name => $session->name, -value => $session->id ); print $q->header( -cookie=>$cookie); $name = $cgi->param($username); $session->param($username, $name);
be $q as well or rather my $cgi = new CGI? Currently i have it defined at the beginning of the script as my $cgi; It is not causing an issue as at the moment i am still getting the error "Can't call method "cookie" on an undefined value at" Again i would really appreciate your help and suggestions with this problem thanks$name = $cgi->param($username);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sessions problems
by f00li5h (Chaplain) on Dec 13, 2006 at 11:00 UTC | |
by Anonymous Monk on Dec 13, 2006 at 11:18 UTC | |
by f00li5h (Chaplain) on Dec 13, 2006 at 20:57 UTC | |
by Anonymous Monk on Dec 13, 2006 at 11:06 UTC | |
|
Re^3: Sessions problems
by themage (Friar) on Dec 13, 2006 at 10:52 UTC |