Entry
How can I make a HTML select box from the values in a database column?
How can prompt the user for their state?
Jun 13th, 1999 07:00
Nathan Wallace, Rod Kreisler
/*connect to your db*/
<form method="post" action="submit_page.php3">
<select name="state">
<?
$result=dbquery("select state from yourtable");
While($state=dbfetch($result){
Print "<option>".$state;
}
?>
</select>
<input type=submit name=submit>
</form>
Of course, you'll need to use the proper commands for the SQL
engine you're using.