Re: Setting cookie with CGI.pm
by Hwg <hwg(at)soundhouse.co.uk>
|
Date: |
Thu, 05 Apr 2001 18:54:20 +0100 |
To: |
David Mintz <mambomintz(at)yahoo.com> |
Cc: |
hwg-languages(at)mail.hwg.org |
References: |
co yahoo |
|
todo: View
Thread,
Original
|
|
Actually the browser I was using was broken and simply wasn't accepting
cookies, that was the first problem. The second was that I had:
my %cookie = cookie('cookie_test');
my $value = $cookie{'value'};
when I should have had:
my $value = cookie('cookie_test');
as cookie('cookie_test') returns a string not a hash as I thought.
Thanks for the suggestion!
On 04 Apr, David Mintz <mambomintz(at)yahoo.com> wrote:
> --- Hwg <hwg(at)soundhouse.co.uk> wrote:
> > I'm trying to set a cookie using CGI.pm and the
> > following code but it
> > doesn't appear to be working. Each time it prints
> > 'Cookie not detected...'
> > and the cookie doesn't appear to have been set in
> > the browser.
> I can't tell from your example -- are you sending any
> output to the browser before attempting to set the
> cookie? If so, that may be your problem.
> (Also, in the duh department, make sure your browser
> isn't set to reject all cookies)
> David Mintz
> Spanish Interpreter
> US District Court, SDNY
> Personal http://panix.com/~dmintz/
> Web design & hosting http://dmintzweb.com/
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
--
Geoff Soper
Soundhouse webmaster
webmaster(at)soundhouse.co.uk
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA