ok, I have a little form. This form has a select tag, with several dynamically generated options. This is all fine and dandy, except it seems to send the LABEL and not the VALUE of the selected option to the next page!
in this case, selecting "formal" will actually send "formal" as the value of $category, rather than "2"..
anyone have any ideas what im doing wrong here?
//the code
<select name="category">
<?
for ($k = 0; $k <= $categoryCount; $k++) {
$categoryId = mysql_result($categoryResult,$k,0);
$categoryName = mysql_result($categoryResult,$k,1);
echo "<option value'" . $categoryId . "'>". $categoryName ."</option>";
}
?>
</select>
//the processed code
<select name="category">
<option value'1'>casual</option><option value'2'>formal</option><option value'3'>sandals</option><option value'4'>boots</option>
</select>
cheers,
lance.