Forum Moderators: open
Some of the code for one of these drop down boxes:
<select name="category" class="buttonssmall">
<option>books</option>
<option>toys</option>
etc.
</select>
The form action calls my PHP file. However, the value of category is not passed on to the PHP file.
If I write a simple program of my own, using options, the whole thing works. The difference between my code and the clients HTML code is that mine does not have a "class" specified for the <select> value. Is there a special syntax that I must use for PHP to read what was selected for category?
What is the function of this "class" specification anyway?
(I've been working in Flash-to-PHP-to-Flash mostly, and am not that clued up on HTML forms.
Thanks
mlkarie
It only defines how the select element is rendered by the browser for this page and should have no effect on any processing that is done after the submit.
<added>
korkus2000, you're just a bit quicker than me tonight!
Must be the two feet of snow I just finished shovelling.
</added>
The correct format is as follows.
<select name="category" class="buttonssmall">
<option value = "bookval">books</option>
<option value = "toyval">toys</option>
etc.
</select>
Hope this helps.