you have to do is to extract values from the database with a query.
i suppose you know...
after that you have to do all you have done till now except the dropdown toolbox(that 
is called actually a listbox).
for the list box you have to write like this:
<select name="select">
<?php for($i=count(records returned by the query);$i++)
echo '<option name='.$records_returned[$i].'>$records_returned[$i].</option>';

so the select it's here your input type text..and the other are the same like you have 
on that form.

if you want an example on how to extract values from a database try to search on 
php.net because now i don't know what database you use and so on...


On Mon, 13 Jan 2003 16:20:27 -0500, Dzung Nguyen wrote
> Anybody could hep me converting the following form to dropdown box?  
> The easier task (I assume) is to populate the box with the all 
> possible values of a column in mySQL table (I don't know what how to 
> do this yet, though).  I also haven't been able to find the 
> dropbox's equivalent of form's input lines that are hidden (e.g. 
> <input type=hidden name=\"select\" value=\"$tempselect\">).  Thank 
> you, I really appreciate your help.
> $temphost = $host;
> $tempselect = $select;
> if ($select == all) {
> echo "<font size=$fontsize-1>Choose host<br></font>
>         <form action=\"build_form.php\" target=\"_top\" method=get>
>         <input type=hidden name=\"select\" value=\"$tempselect\">
>         <input type=hidden name=\"order\" value=\"$order\">
>         <input type=hidden name=\"ordertwo\" value=\"$ordertwo\">
>         <input type=hidden name=\"way\" value=\"$way\">
>         <input type=hidden name=\"waytwo\" value=\"$waytwo\">
>         <input type=hidden name=\"date\" value=\"$date\">
>         <input type=hidden name=\"target\" value=\"$target\">
>         <input type=hidden name=\"input\" value=\"$input\">
>         <input type=hidden name=\"output\" value=\"$output\">
>         <input type=hidden name=\"test\" value=\"$test\">
>         <input type=hidden name=\"result\" value=\"$result\">
>         <input type=\"text\" name=\"host\" value=\"$temphost\" 
> size=17 maxlength=10></form>" ; echo "</table>" ; }
> -- 
> Dzung V. Nguyen                     email: [EMAIL PROTECTED]
> Alpha Linux Group                   http://linux.iol.unh.edu/clp
> InterOperability Laboratory
> University of New Hampshire         phone: (603) - 862 - 0401
> Durham, NH 03824                    fax  : (603) - 862 - 4181
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to