Posted by finbogey jones on 12/08/06 00:51
obiron wrote:
> 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
>
Thank you very much. I now have the form looking right and am moving on
to the page that takes the value and changes the db with the selection.
fin
[Back to original message]
|