I am working on various projects for my organization that were started by another developer. A good portion of this work involves form processing with PHP.
I was rather surprised to see that for many of the form values, the previous developer used spaces (for example <input type="radio" value="DO NOT ENROLL" name="proceed" /> ). I think I know why he did it - he sends it as it email and makes it easy to display the values in a human readable format without additional processing, but, as someone who is used to 'typical' programming naming conventions (no spaces, camel case, pascal case, and so on), this does make me a little uneasy. Whenever I have processed HTML forms and assigned values, I believe I always tried to following "typical" variable naming conventions, but this could have habit rather than a necessary practice.
Now, I am not saying he is wrong, but I tried to do a little research on the topic and have not reached a definite conclusion. So my question is this - is there anything wrong with including spaces in values assigned to HTML form input elements - particularly when it will be sent over email? If so, what complications may result, and is there a way to properly process them, or would you recommend keeping the actual form values simple (for example, <input type="radio" value="decline" name="proceed" /> and THEN processing them to make them more readable after the form is submitted.
Thanks for any input!
texttype input, or even a textarea? I can't think of any good reason not to use spaces inside values...