Spaces in form values --> cgi
Hi, Is it ok to have spaces in the "value" of a form element? Kayak Touring Rescue Techniques Or do I need to use underscores, Kayak Touring Rescue Techniques Thanks Dave PS: TGIF! ** * Cora Connection Your West African Music Source * * http://www.coraconnection.com/ * * Resources, Recordings, Instruments & More! * ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Spaces in form values --> cgi
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? Kayak Touring Rescue Techniques Or do I need to use underscores, Kayak Touring Rescue Techniques Thanks Dave PS: TGIF! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spaces in form values --> cgi
On Fri, 15 Feb 2002, David Gilden wrote: > Kayak Touring Rescue >Techniques > > Or do I need to use underscores, > > Kayak Touring Rescue >Techniques I believe the spaces will get replaced with %20. I question the necessity of making the value of the option the same as the text you are displaying (actually, if you don't specify a value, the text IS the value). It would be better to make the value something short, like 'KTRT' or some similar mnemonic (like perhaps an id field you wouuld be looking up in a database...) It will make your life a lot easier. -- Brett http://www.chapelperilous.net/ To err is human -- but it feels divine. -- Mae West -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]