Posted by obiron on 12/07/06 11:35
Except that it is the form bit we need :)
you have generated the HTML for the <FORM method=\"post\"
action=\"somepage.php\"> and for the <SELECT value=\"recordID\">....
You now use the object / array to generate the option bit of the code.
$HTML = "<OPTION value=\"$result['value']\"> $result['Fname']
$result['Sname']</OPTION>";
PRINT $HTML;
and then end the </SELECT >
You will now see in the HTML
<OPTION value="17">Fred Smith</OPTION>
<OPTION value="18">John Jones</OPTION>
<OPTION value="19">Peter Parker</OPTION>
Basically whatever you put between <OPTION> and </OPTION> will show in
the drop down list but the value is what gets passed back to the server
as part of the form submit and will end up in $_POST['recordID']
Hope this helps
Navigation:
[Reply to this message]
|