jna wrote:

> Hello,
> 
> Is anyone using CGI.pm and the built in cookie routine? I just implemented
> it on one of my websites storing username and password and retrieving it for
> user identification. Problem is it works for me and for alot of other people
> but there are a large group of people who it is NOT working for? Has anyone
> experienced a split in  browser ability with CGI.pm and its cookies? Is this
> a bug or is anyone aware of it? I am certain it cant be my code, else it
> wouldnt work at all?
> 
> Snippets:
> 
> To issue cookie:
> 
> $the_cookie = $cgi->cookie(-name=>'userdata',
>                          -value=>\%userdata,
>                          -expires=>'+15m',
>                          -path=>'/cgi-bin/path',
>                          -domain=>'.thedomain.com',
>                          -secure=>0);
> print $cgi->header(-cookie=>$the_cookie);
> 
> to grab cookie:
> 
> $user = "";
> $pass = "";
> %userdata = $cgi->cookie('userdata');
> foreach ('userid','password','expires') {
>     $userdata{$_} = $cgi->param($_) || $userdata{$_};
> }
> $user = $userdata{'userid'};
> $pass = $userdata{'password'};
> $expires = $cgi->cookie('expires');
> 
> Any thoughts or ideas ?


Using a hash for the cookie value is going to concatenate them all 

together with &'s.  I would either use multiple cookies or concatenate
the hash together myself into $value and pass it that way.  I'm not
sure what the intent was for using a hash for the cookie value.

-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to