| Posted by Roy W. Andersen on 06/16/34 11:50 
amit wrote:> <select name=selected_group>
 >      <option> Gropu 1</option>
 >      <option> Group 2</option>
 >      and ...
 > </select>
 
 Each option needs to have a value assigned. The text between <option>
 and </option> is only visual and is not used for the actual form-data
 when submitting it to the server. Hence, the code quoted above will
 submit an empty value for "selected_group" regardless of what's actually
 selected.
 
 This is how you should do it:
 
 <select name="selected_group">
 <option value="Group 1">Group 1</option>
 <option value="Group 2">Group 2</option>
 </select>
 
 This way, when the form is submitted, what you've defined in the
 value-parameter is what is actually sent to the server.
 
 
 Roy W. Andersen
 --
 ra at broadpark dot no / http://roy.skyggenesdal.org/
 
 "Hey! What kind of party is this? There's no booze
 and only one hooker!"          - Bender, Futurama
 [Back to original message] |