Jump to content

Pulling data from MySQL and put it into a dropdown


craigeves

Recommended Posts

I am trying to pull data from my MySQL database and pop it into a drop down menu.

 

This is no problem - however my selection always appears on 'No' even if 'Yes' has been selected in my database.

 

Where is my code going wrong?

 

Thanks

 

<form action="addlo.php" method="post">
            <table width="800"><tr><td width="150" class="rowHeaders">Location
              <td width="650"><input type=text name=location>
              <tr>
              <td width="150" class="rowHeaders">Enable Location?
              <td width="650"><select name=enable><option value=1>Yes</option><option value=0>No</option></select>
              <tr><td width="150"><input type=submit value="Add Location" class="button">
                                
            </table>
    </form>

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.