The exact implementation differs with your database system, but as an
example for MySQL:
<select name="select" size="1">
<?php
$result = mysql_query($query);
while($row = mysql_fetch_assoc){
echo("<option
value=\"{$row['name_of_value_field']}\">{$row['name_of_description_field']}<
/option>");
}
?>
</select>
greetz,
Arnout
"Harlequin" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> Another day another conundrum.
>
> I have a form where one option is a dropdown menu. I'd like that menu to
> only have items in it that are actually available. Selecting the items
with
> a query is easy enough but I wondered if anyone could tell me where to
start
> wit the code.
>
> Am I using a for each again . . . ?
>
> Any help greatly appreciated.
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php