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
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.
I dont know what kind of db so I will just use mysql,
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']}
3 matches
Mail list logo