$POST and $GET to get value from dropdown
<p><strong>a.html</strong></p>

<pre><code>function load(str)
{   
    xhttp.open("GET","a.php?q="+str,true);
    xhttp.send();
    }           
}        
&lt;select name = "select"  onchange ="load(this.value)"&gt;                   
  &lt;option selected = "selected"&gt;Select a movie&lt;/option&gt;                   
  &lt;option value= "asc"&gt;Name in ascending order&lt;/option&gt;
  &lt;option value = "genre"&gt;Genre&lt;/option&gt;                           
&lt;/select&gt;
</code></pre>

<p><strong>a.php</strong></p>

<pre><code>$asc = $_POST['asc'];
$genre = $_POST['genre'];
if (!empty($_GET[$asc])) {
    $sql = "SELECT * FROM movies order by Name ASC";
} else if (!empty($_GET[$genre])) {
    $sql = "SELECT * FROM movies order by Genre ASC";
}
$db = mysql_connect("localhost","root","123"); 
$db_select = mysql_select_db('m',$db);
if ( ( $result = mysql_query( $sql, $db ) ) ) {
     echo $result;  
}
</code></pre>

<p>I want to select the value from dropdown button. For instance <code>asc</code>, and pass the value to <code>a.php ($asc = $_POST['asc'])</code>. How could I do that?</p>