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;
In reply to Problems getting cookies by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |