on 02/06/2001 05:41, Curtis Poe at [EMAIL PROTECTED] wrote:
> In this case, I think your code may be at fault. Set the cookie when printing
> the redirect header.
> Here's one way to set a cookie with a redirect header:
>
> #!C:\perl\bin\perl.exe
> use CGI;
> my $cgi = CGI->new;
> my @cookieOut;
> push @cookieOut, ($cgi->cookie( -name => 'id',
> -value => "something",
> -expires => '+7d',
> -path => '/'));
>
> print $cgi->redirect( -cookie => \@cookieOut,
> -location => 'http://www.somehost.com' );
Yes yes yes!! It works a treat - What a great idea - calling cookies within
a redirect header. Thanks Curtis.
That now makes crystal clear sense of this statement in Mr Stein's CGI.pm
abstract...
"All other parameters recognized by the header() method are also valid in
redirect."
Regards, Mark.