Yeah, you will be fine with the spaces.

The browser may(?) URL encode them before sending them to the server.  So
your value will look like this when it hits the server:

kayak+touring+rescue+techniques

....Or maybe this, which is equivelent:

kayak%20touring%20rescue%20techniques

When you use CGI.pm (or some other library), it will decode them for you.
So when you get it you won't see any spaces.

But frankly I'm not 100% sure if form data gets URL encoded anyway.  I think
it does, but I haven't analyzed form data for a long time... and you won't
need to either because the library you use will decode as needed anyway.

So yeah, use spaces!  (just not in URL's :) ...but that's another story)

Rob



-----Original Message-----
From: David Gilden [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 3:09 PM
To: [EMAIL PROTECTED]
Subject: Spaces in form values --> cgi


Hi, 


Is it ok to have spaces in the "value" of a form element?


<option value="kayak touring rescue techniques">Kayak Touring Rescue
Techniques</option>


Or do I need to use underscores,

<option value="kayak_touring_rescue_techniques">Kayak Touring Rescue
Techniques</option>


Thanks

Dave

PS: TGIF!

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

Reply via email to