You are here: Re: dropdowns « All PHP « IT news, forums, messages
Re: dropdowns

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация