"Gamco - Gawie Marais" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Could someone help me out here...
>
> I have a mysql database with a table that conatains names. I am setting up
a
> html form and I would like to create a multi-listing with those names so
> that you can choose one and then submit the form.
// open db connection...
$result = mysql_query("SELECT name FROM table");
echo '<select name="names">';
while ($row = mysql_fetch_assoc($result)) {
echo '<option>' . $row['name'] . '</option>';
}
echo '</select>';
Haven't tested it. Change 'name' to the name of your table column.
Regards,
Torsten Roehr
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php