in reply to Problem with Cookies on Netscape but Ok in IE

Please tell me that you aren't really going to use cookies to store usernames and passwords. . .

-Any sufficiently advanced technology is
indistinguishable from doubletalk.

  • Comment on Re: Problem with Cookies on Netscape but Ok in IE

Replies are listed 'Best First'.
(cLive ;-) Re: Problem with Cookies on Netscape but Ok in IE
by cLive ;-) (Prior) on Jan 16, 2002 at 11:48 UTC
    Oh yes, good one - and I was going to add, why are you using CGI but not using it?
    #!/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]), $q->start_html({-title => 'CTB Discussion Index', -style => {'src'=>'../../ctb/css/header.c +ss'}, -bgcolor => '#FFFFFF', -topmargin => 2, -marginheight => 2, -leftmargin => 2, -marginwidth => 2), $q->p('Cookie is set'), $q->br, $q->end_html;
    As for the password, I'd set a session ID instead, that expires after a certain length of time (store it in a text file or DB somewhere for later checking).

    cLive ;-)