> -----Original Message-----
> From: Wagner Garcia Campagner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 04, 2001 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: variables using blank spaces
> 
> 
> Hi,
> 
> I have a varilable:
> 
> $var = 'asdf asdf asdf';   #using blank spaces
> 
> Then i send it to another script like this:
> 
> <INPUT TYPE=hidden NAME=var VALUE=$var>
> 
> The problem is when i get it back the value became:
> 
> $var = asdf
> 
> It stops in the first blank space.... is there a way for me 
> to recover all
> the variable??

1. Enclose value in quotes and encode entities:

   print q[<input type="hidden" name="var" value="],
         HTML::Entities::encode_entities($var), q[">];

Or, use CGI module, which will do this for you:

   print $q->hidden(var => $val);

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to