title: populate multiple drop down list
body: <p>i have 3 table in database that must be displayed  in 3 drop list using php and mysql  but these three table go like this user select from the first one then the second drop list will display data based on the selection of the first and the third based on the selection of the second ...
  my question is what is better </p>
  
  <p>using three different tables   country district village
    or just one that contain all the data  </p>
  
  <p>can anyone help me ??
   i can populate the tree table but independent from each other </p>
  
  <h1>these are 2 queries</h1>
  
  <pre><code>function districtQuery(){
  
  $distData = mysql_query("SELECT * FROM districts");
  
    while($recorddist = mysql_fetch_array($distData)){
  
       echo'&lt;option value="' . $recorddist['district_name'] .  '"&gt;' . $recorddist['district_name'] . '&lt;/option&gt;';
  
    }
  
  
  }
  // function for select by village
  function villageQuery(){
  
  //$villageData = mysql_query("SELECT * FROM village");
  
    $villageData = mysql_query("SELECT village_name FROM village INNER JOIN districts ON village.district_id = districts.district_id") or die (mysql_error());
  
    while($recordvillage = mysql_fetch_array($villageData)){
  
       echo'&lt;option value="' . $recordvillage['village_name'] .  '"&gt;' . $recordvillage['village_name'] . '&lt;/option&gt;';
  
    }
  
  
  } 
  </code></pre>