################################## #set cookie ################################## #!/usr/bin/perl -w use CGI ; my $q = new CGI; my $co_userid = $q->cookie(-name=>'user', -value=>'dummy', -domain=> '.jplan.com', -path=> '/cgi-bin/') ; my $co_password = $q->cookie(-name=>'password', -value=>'hispassword', -domain=> '.jplan.com', -path=> '/cgi-bin/'); print $q->header(-cookie=>[$co_userid,$co_password]); print "<html>\n"; print "<HEAD>","\n"; print "<TITLE>CTB Discussion Index</TITLE>\n"; print "<link rel=stylesheet type=\"text/css\" href=\"../../ctb +/css/header.css\">\n"; print "</head>\n"; print "<body bgcolor=#FFFFFF topmargin=2 marginheight=2 leftma +rgin=2 marginwidth=2 >\n"; print "Cookie is set<br>"; print "</body></html>"; ####################################### #get cookie ####################################### #!/usr/bin/perl -w use CGI; $query = new CGI; my $ci_password = $query->cookie('user'); my $ci_userid = $query->cookie('password'); print "Content-type: text/html\n\n"; print "<html>\n"; print "<HEAD>","\n"; print "<TITLE>Messages Posted Last 10 Days -- Compact Tractor Board</T +ITLE>","\n"; print "<link rel=stylesheet type=\"text/css\" href=\"../../ctb/css/hea +der.css\">\n"; print "</head>\n"; print "<body bgcolor=#FFFFFF topmargin=2 marginheight=2 leftmargin=2 m +arginwidth=2 >"; print " userid= $ci_userid<br>"; print " pw = $ci_password<br>"; print "</body></html>";
In reply to Problem with Cookies on Netscape but Ok in IE by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |