Re: Retain Spaces in field value
- From: "nobull67@xxxxxxxxx" <nobull67@xxxxxxxxx>
- Date: 27 Sep 2006 10:11:41 -0700
AJ wrote:
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 = Table
my $cookie = cookie(-name => 'Building',
-value => $cgi->param('Building'),
-expires => '+3d');
and then reference it like $cookie_id.
eh?
That doesn't make sense. The variable $cookie_id above has nothing to
so with any cookies. Please decide which CGI.pm API you are using and
stick with it.
Please produce a _minimal_ but _complete_ script (with warnings and
strictures enabled) that you've actually run and observed to display
the symptoms you describe. Post the script verbatim (copy+paste, do
not retype).
In PHP I know I can use
urlencode to preserve the spaces but I can't find out how perl does it.
I think you mean Perl, not perl. How Perl does what? URL
encoding/decoding? There are modules on CPAN to do that but it's only
actually one line of code. The code can be found in the FAQ "How do I
decode or create those %-encodings on the web?"
But CGI::cookie's -value parameter doesn't need encoding.
.
- References:
- Retain Spaces in field value
- From: AJ
- Retain Spaces in field value
- Prev by Date: Re: call HTML page from PERL
- Next by Date: Re: cgi
- Previous by thread: Retain Spaces in field value
- Next by thread: Dr. Camles Brain De-Age Game
- Index(es):
Relevant Pages
|