At 19:19 20/09/2000, Dave Dunstan wrote:
>OH! Sweet. Thanks again Bill. You are becoming my personal Perl hero ...
I'm guessing that means it worked? ;-) I have tried the following, but it
produces the following output:
Status: 302 Moved Set-Cookie: Test=Test%20Data; path=/scripts; expires=Tue,
20-Feb-2001 11:24:40 GMT Date: Wed, 22 Nov 2000 11:24:40 GMT Location:
http://www.psyche.net.uk
here's what I used to get that output:
use CGI;
use CGI::Cookie;
$query = new CGI;
$NAME = "Test";
$EXPIRY = "+3M";
$VALUE = "Test Data";
$PATH = "/scripts";
$URL = "http://www.psyche.net.uk";
$c = new CGI::Cookie(-name => "$NAME",
-expires => "$EXPIRY",
-value => "$VALUE",
-path => "$PATH"
);
print $query->redirect(-uri=>"$URL", -cookie => ["$c"]);
if I just do:
print $query->redirect(-uri=>"$URL");
on it's own, then it works fine. It just stops as soon as I add on the
Cookie part. Any ideas why it doesn't work, or what is going on?
Many thanks in anticipation of your help.
Regards,
Roland
> > -----Original Message-----
> > From: $Bill Luebkert [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 20, 2000 12:11 PM
> > To: Dave Dunstan
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: set cookie, then redirect
> >
> >
> > Dave Dunstan wrote:
> > >
> > > Hey folks, Dave Dunstan here.
> > >
> > > I'm wondering how to use CGI.pm to:
> > > 1) Set a cookie, then
> > > 2) Redirect to another page ... at the same time.
> >
> > Create your cookie and just add -cookie arg on redirect command.
> >
> > Something like (untested):
> >
> > print redirect (-uri => $url, -cookie => [$cookie]);
> >
> > or $query->redirect(...) for OO method.
--
Roland Corbet
Systems Administrator & Developer
Psyche Solutions Limited
Chester Road
Cradley Heath
West Midlands
B64 6AB
Tel: + 44 (0)1384 414183 Ext. 4412
Fax: + 44 (0)1384 414111
E-Mail: [EMAIL PROTECTED]
WWW: http://www.psyche.net.uk
--
The information contained within this e-mail sent by Cradley Print Ltd. is
confidential and is intended for the named recipient only. If you are not
the intended recipient please notify us by telephone immediately on 01384
414100 (UK)or +(44)1384 414100 (International) or return it to us by e-mail
quoting the name of the sender and the addressee. Please then delete it from
your system.
Encryption and Viruses
==================
Please note that this e-mail and any attachments have not been encrypted.
They may therefore be liable to be compromised. Please also note that it is
your responsibility to scan this e-mail and any attachments for viruses.
Viruses and compromises of security are inherent risks in relation to
e-mail.
We do not, to the extent permitted by law, accept any liability (whether in
contract, negligence or otherwise) for any virus infection and/or external
compromise of security and/or confidentiality in relation to transmissions
sent by e-mail.
Contracts
========
Please note, that contracts may NOT be concluded on behalf of Cradley Print
Ltd by e-mail, but contracts on behalf of our clients may be concluded by
e-mail.
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web