lmayer4
09-27-2006, 03:08 PM
Morning,
I have a value I'm trying to pass from a form in a cookie. The first
time it's passed it shows up as "North Hall A" but when a user is sent
back to the page the value changes to "North"
I set the cookie like:
my $cookie_id = param('Building');
my $cookie = cookie(-name => 'Building',
-value => $cgi->param('Building'),
-expires => '+3d');
and then reference it like $cookie_id. In PHP I know I can use
urlencode to preserve the spaces but I can't find out how perl does it.
Thanks for any help.
AJ
I have a value I'm trying to pass from a form in a cookie. The first
time it's passed it shows up as "North Hall A" but when a user is sent
back to the page the value changes to "North"
I set the cookie like:
my $cookie_id = param('Building');
my $cookie = cookie(-name => 'Building',
-value => $cgi->param('Building'),
-expires => '+3d');
and then reference it like $cookie_id. In PHP I know I can use
urlencode to preserve the spaces but I can't find out how perl does it.
Thanks for any help.
AJ