For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > August 2005 > Cookie Problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cookie Problem
Mike Blezien

2005-08-02, 9:00 am

Hello,

I'm trying to pass a cookie value as a string. IE:

$cookie_string = "$params->{username}|$params->{password}|$time|$time";

$cookie =
$cgi->cookie(-name=>'cookie_name',-value="$cookie_string",-expires=>'+1y');

But this is the result I get:

test22%7C123456%7C1122932023%7C112293202
3

I'm trying to eliminate the '%7C' character so it has the pipe '|' character
instead. I've tried to do a JOIN:
join("\|",$params->{username},$params->{password},$time,$time);
same results. Tried to use the unescape($cookie_string), again the same results.
Is there a way to pass the cookie string and retain the pipe character '|'
without it being changed to the '%7C' character.

TIA,

--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com