I have two simple scripts one to set and one to get the cookie. The script uns fine under IE but under Netscape it does not set the cookie. But other cookies are being set on the netscape browser that I am running by others. Is there a difference between IE and Netscape on this ???
################################## #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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.