I have a two-part database transaction. First I run a query to supply the browser with a list of items that can be acted on. For example, suppose this query returns:
id name
1 ferns
2 gardenias
3 venus fly trap
Currently I'm putting these choices in a select stmt as follows:
<select name="whichplant">
<option>1 ferns</option>
<option>2 gardenias</option>
<option>3 venus fly trap</option>
</select>
The user selects one of these and submits, then I run a second query using the id of the item the user selected. This query does the real work.
Currently I'm parsing out the id from $whichplant, which works fine.
The problem is that users are confused by the number, which to them means nothing. How can I take the id's out of my select statment and still pass the selected one back to the webserver?
Thanks in advance!