View Single Post
Old 06-14-2011, 07:14 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,196
Code:
<?php
include("../includes/connect.php");
$query = "SELECT * FROM city";
if ($result = $db->query($query)) 
{
  echo "<select name=\"select\">";
  while ($row = $result->fetch_assoc()) 
  {
    $name = $row['city_name'];
    echo "<option>$name</option>";
  }
  echo "</select>";
  $result->free();
}
$db->close();
?>
That fixes your dropdown issue.
__________________
All cookies cleared!

Last edited by sarettah; 06-14-2011 at 07:15 PM..
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote