title: select tags with database in php
body: <p>I have an issue that i need to learn how to solve! I'm making a submission form which consists of some select tags drop menus! so all of these drop menus are getting the data from the database i did that but the issue is that i need when i select something from Drop menu#1 i make a query and choose the matching data from the database and post them to Drop menu#2 ! so here is my code :-</p>
  
  <pre><code>&lt;?php
  echo "Choose your Source :&lt;select name='source' value='Source'&gt;
                        &lt;option&gt; &lt;/otpion&gt;";
  $sql = "SELECT City_name FROM city";
  $info = mysql_query($sql);
  
  while ($row = mysql_fetch_array($info)) {
      echo "&lt;option &gt; '" . @$row[0] . "'&lt;/option&gt;";
  }
  
  echo "&lt;/select&gt;";
  echo "Choose your Destination :&lt;select name='destination' value='Destination'&gt;
                              &lt;option&gt; &lt;/otpion&gt;";
  echo @$source = $_POST['source'];
  $sql = "SELECT Destination FROM Schedule  WHERE Source ='" . @$source . "'";
  $info = mysql_query($sql);
  
  while (@$row = mysql_fetch_array($info)) {
      echo "&lt;option selected='selected'&gt;'" . @$row['0'] . "'&lt;/option&gt;";
  }
  
  echo "&lt;/select&gt;&lt;br /&gt;";
  ?&gt;
  </code></pre>
  
  <p>so now all i want to know, how can i get values from the database into "destination" drop menu when i select a value from "source" drop menu without refreshing the page nor clicking any buttons! thanks in advance .</p>