Populating A Dropdown List Via MS Access
Posted: Sat Dec 05, 2009 3:22 pm
Ok mr Newbie here is trying to populate a dropdown list, but it wont populate, here is the code so far.......
Can someone tell me how stupid l am and correct this? 
Bish
Code: Select all
<div class="pageheader">Warehouse Property Page</div><br />
<?php require_once('../App_Data/odbc_open.php');
$query = odbc_exec($odbc, "SELECT DISTINCT country FROM sheds") or die (odbc_errormsg()); ?>
<form action="action" method="post">
<select name="option">
<?php while($row = odbc_fetch_array($query))
{
echo "<option value='$row[country]'>";
}
odbc_close($odbc); ?>
</select>
</form>
</div
Bish