in reply to Cookie Failure

Which bit exactly isnt working? the output is wrong or the cookie doesnt get set

>perldoc CGI::Cookie

has different syntax to yours, give that a spin see if it makes any difference?

Replies are listed 'Best First'.
RE: RE: Cookie Failure
by Merlin83 (Novice) on Aug 03, 2000 at 03:29 UTC
    I tried CGI::Cookie with no effect on the results, still the page is displayed and no cookie is stored. The code now looks as follows:

    #!/usr/bin/perl use CGI; use CGI::Carp (fatalsToBrowser); use CGI::Cookie $co = new CGI; $cook2 = new CGI::Cookie(-name=>'test2', -expires=>'+1h', -value=>'sav +eme2'); $cook = $co->cookie( -name=>'test', -path=>'/', -expires=>'+1h', -value=>'saveme' ); print $co->header(-cookie=>[$cook,$cook2]); print 'output';

    Nothing changes either if I try to only use one cookie, nomatter which one of the two it is. ...-path=>'/'... has no effect on either - it defaults to '/' as I said before.