Reply to Re: dropdowns

Your name:

Reply:


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

[Back to original 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

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