hovercraft
Technical User
Greetings,
I'm having a bit of a problem with the values in a dropdown.
I have 3 fields in a mysql table. I would like to display 2 of those fields as an <option> in a dropdown however, the 3rd field's value is what I wish to capture.
The fields are;
1) desc_descid
2) desc_desc_s
3) desc_desc_l
I'm trying to display fields 2 and 3 but actually capture the value of field 1 (desc_descid).
Here is what I have thus far
This of course displays the desc_descid but I can't figure out how "not to display" the value of desc_descid but allow the two other fields to be displayed in line as part of the option.
I hope I'm making sense.
Thank you very much in advance.
I'm having a bit of a problem with the values in a dropdown.
I have 3 fields in a mysql table. I would like to display 2 of those fields as an <option> in a dropdown however, the 3rd field's value is what I wish to capture.
The fields are;
1) desc_descid
2) desc_desc_s
3) desc_desc_l
I'm trying to display fields 2 and 3 but actually capture the value of field 1 (desc_descid).
Here is what I have thus far
Code:
$rs_desc = mysql_query("SELECT * FROM `inv_desc` WHERE desc_descid > '0';");
echo '<p>'."Enter NEW Pallet Data".'<br>';
echo '<select name="my_descid">';
while ( $row = mysql_fetch_array($rs_desc) )
{
echo '<option>'.($row["desc_descid"]).'</option>';
}
echo '</select> </p>';
This of course displays the desc_descid but I can't figure out how "not to display" the value of desc_descid but allow the two other fields to be displayed in line as part of the option.
I hope I'm making sense.
Thank you very much in advance.