Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I set a cookie like so:
my $cookie = $q->cookie( -name => 'sessionID', -value => \@sessionID, -expires => '+1h', -path => '/admin/', -domain => '.mydomain.com', -secure => 0 );
I proceed to print the cookie out with an HTML header. I can see that the cookie is successfully set by viewing cookies in my browser:
Name: sessionID Information: username&password Domain: .mydomain.com Path: /admin/ Server Secure: no
I then check for the cookie:
if ($q->cookie("sessionID")) { ($submitted_user, $submitted_pass) = @{ $q->cookie("sessionID") }; } else { error("Invalid user/pass. Please login again."); }
And it displays an error. So I print out the contents of $q->cookie('sessionID'); and it is empty, nothing there. Any ideas what the problem could be? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Empty Cookie
by bobn (Chaplain) on Jun 27, 2003 at 14:12 UTC | |
by Anonymous Monk on Jun 27, 2003 at 19:47 UTC | |
|
Re: Empty Cookie
by gmpassos (Priest) on Jun 28, 2003 at 01:50 UTC | |
by Anonymous Monk on Jun 28, 2003 at 02:03 UTC | |
|
Re: Empty Cookie
by cfreak (Chaplain) on Jun 27, 2003 at 13:18 UTC | |
by Anonymous Monk on Jun 27, 2003 at 13:25 UTC |