in reply to Re^3: Setting and Reading Cookies
in thread Setting and Reading Cookies

Hay, thanks for the info, I just wanted to tel you that the part you game me to read my cookies works great. I can't under why I can't set any more then one cookie. have any ideas. print $cgi->header( -cookie => $cookie1,$cookie2,$cookie3) This my line that I use. It just doesn't set cookie2 or cookie 3. Thanks Joe

Replies are listed 'Best First'.
Re^5: Setting and Reading Cookies
by crashtest (Curate) on Jun 21, 2005 at 03:37 UTC
    bigjoe11a, did you try reading the perldoc for CGI that gryphon linked to? I did, and I found the following blurb one or two screens down:
    To create multiple cookies, give header() an array reference:
    $cookie1 = cookie(-name=>'riddle_name', -value=>"The Sphynx's Question +"); $cookie2 = cookie(-name=>'answers', -value=>\%answers); print header(-cookie=>[$cookie1,$cookie2]);
    So for your specific example, try print $cgi->header( -cookie => [$cookie1,$cookie2,$cookie3] ).
      Sorry, too late to tell you, I got it working, works great too, I downloaded CGI.pm. as soon as I get a chance to go over it I will. Thanks For your time.