jck has asked for the wisdom of the Perl Monks concerning the following question:
use CGI; my $q = new CGI; my $sessid = $q->cookie('SESSID'); if (!$sessid) { print $q->redirect("http://my.domain.com/loginpage/"); exit; } my $cookie = $q->cookie(-name=>"SESSID", -value=> $sessid, -expires => + "+1h"); print $q->header({-type=>"text/html", -charset=>"utf-8", -cookie=>$coo +kie});
I'm modifying a new page, which has a series of links to reload the script with three variables, for year, month and day:
http://my.domain.com/cgi-bin/eventedit?year=2007&month=1&day=9
when i load the script using the link, the sessid ends up undefined, and the page redirects, even though i can see the sessid in the cookie!! does anyone know what's going on?
the thing i don't understand is that i've used this with a lot of other pages, and they work fine...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: vanishing cookie?
by jettero (Monsignor) on Jan 15, 2007 at 23:05 UTC | |
by jck (Scribe) on Jan 15, 2007 at 23:24 UTC | |
by jettero (Monsignor) on Jan 15, 2007 at 23:32 UTC |