|
Posted by Michael Fesser on 01/02/08 05:44
..oO(Alan M Dunsmuir)
>I have a Form with a <SELECT> tab, its <OPTION> tabs generated by
>records in a database table using PHP5 and a 'SELECT' query.
>
>The values displayed are chosen to be recognisable to the users (they
>are in fact a list of names), but the data I need to process in the
>post-back come from other related fields in the same database record.
If these records are identified by a number for example, assign them to
the 'value' attribute of your select options:
<select name="foo">
<option value="1">first name</option>
<option value="2">second name</option>
...
</select>
After submit, you can find the number of the chosen option in
$_POST['foo'] or $_GET['foo'].
Micha
Navigation:
[Reply to this message]
|