I have a script that sets and retreives cookies on a win32 box using Apache. The scripts sets and retreives cookies containing numeric data fine. When the cookies are filled with Letters and such I cannot retreive the cookie.
I am using PERL and the CGI.pm module so this is a straight forward process. I virtually cut and paste the code from the modules documentation and no syntax error is occuring.
%info=(name=>$obj->{name}
age=>$obj->{age});
$cookie2 = $query->cookie(-name=>'cookiename',
-value=>\%info);
print $query->header(-cookie=>$cookie);
%answers = $query->cookie('cookiename');
if (%answers){..do code..}
else {print "cookie failed"}
I am using PERL and the CGI.pm module so this is a straight forward process. I virtually cut and paste the code from the modules documentation and no syntax error is occuring.
%info=(name=>$obj->{name}
age=>$obj->{age});
$cookie2 = $query->cookie(-name=>'cookiename',
-value=>\%info);
print $query->header(-cookie=>$cookie);
%answers = $query->cookie('cookiename');
if (%answers){..do code..}
else {print "cookie failed"}