Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am having a problem getting these set/get cookie scripts to work with Firefox or any Mozilla browsers. I'm befuddled and would appreciate any suggestions.
setacookie.cgigetacookie.cgi#!/usr/bin/perl use CGI; use CGI::Carp qw(fatalsToBrowser); $query2 = new CGI; $cookie = $query2->cookie(-name=>'TEST-COOKIE', -value=>'test cookie ', -expires=>'24h', -path=>''); print $query2->header(-cookie=>$cookie); print"<html> <body> <a href='http://www.yourdomain.com/cgi-bin/getacookie.cgi'>This is a l +ink</a> </body> </html>"; print $query2->end_html;
#!/usr/bin/perl use CGI; use CGI::Carp qw(fatalsToBrowser); $cgi_query = new CGI; print $cgi_query->header; print $cgi_query->start_html('getacookie program'); print $cgi_query->h4('Your cookie name is...'); $testCookie = $cgi_query->cookie('TEST-COOKIE'); print "<PRE>\n"; print $testCookie; print $cgi_query->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems getting cookies
by moritz (Cardinal) on Oct 14, 2010 at 06:38 UTC | |
by Anonymous Monk on Oct 14, 2010 at 07:38 UTC | |
by mjscott2702 (Pilgrim) on Oct 14, 2010 at 08:33 UTC | |
by Anonymous Monk on Oct 14, 2010 at 13:28 UTC | |
by moritz (Cardinal) on Oct 14, 2010 at 09:30 UTC | |
by Anonymous Monk on Oct 14, 2010 at 13:33 UTC | |
|
Re: Problems getting cookies
by Anonymous Monk on Oct 14, 2010 at 16:14 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |