Jump to content

dropdown is blank


jeff5656

Recommended Posts

I have a table called states, but when I do a while loop to populated a dropdown, the dropdown has no content.  I use this code for other dropdowns with no problems. Any ideas?

 

<select name="state"><?php
$q = "SELECT * FROM states ORDER BY states";
$result=mysql_query($q) or die (mysql_error());
$num_svcs=mysql_num_rows($result);
while ($row = mysql_fetch_assoc ($result)) {
?><option value="<?php echo $row['abbrev'];?>"><?php echo $row['name'];?></option>
    <?php
}?>
</select>

Link to comment
https://forums.phpfreaks.com/topic/208062-dropdown-is-blank/
Share on other sites

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.