You are here: Re: HTML and PHP question (not assinging any value) « PHP Programming Language « IT news, forums, messages
Re: HTML and PHP question (not assinging any value)

Posted by Roy W. Andersen on 12/18/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация