Jump to content

Populating A Dropdown List Via MS Access


contraboybish

Recommended Posts

Ok mr Newbie here is trying to populate a dropdown list, but it wont populate, here is the code so far....... 

                   

                   <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>

 

Can someone tell me how stupid l am and correct this? :-)

 

Bish

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.