joshua has asked for the wisdom of the Perl Monks concerning the following question:
I tried the following code in a run-mode; it redirects, but it doesn't seem to set the cookie...
$self->header_type('redirect'); $self->header_props( -cookie=> $q->cookie( -name=>$account, -value=>$new_session_id ) , -uri=>"http://x.com/cgi-bin/admin.cgi?mode=admin&account=$accoun +t" );
I'm currently using the following code, but would rather not resort to using HTML...
Thanks!$self->header_props( -cookie=> $q->cookie( -name=>$account, -value=>$new_session_id ) ); my $output = $q->start_html( -head=>$q->meta({-http_equiv=>'Refresh',-content=>"0; URL=http://x +.com/cgi-bin/admin.cgi?mode=admin&account=$account"}) ); $output .= $q->a({-href=>"http://x.com/cgi-bin/admin.cgi?mode=admin&ac +count=$account"},"Proceed to admin >>"); $output .= $q->end_html(); return $output;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Application - Setting a Cookie and Redirecting
by rob_au (Abbot) on Aug 26, 2002 at 02:05 UTC | |
|
Re: CGI::Application - Setting a Cookie and Redirecting
by spartacus9 (Beadle) on Aug 28, 2002 at 03:50 UTC |