title: I have changed dropdown menu created from select and option tag to a Hoverable Dropdown menu. How should i pass values in it
body: <p>I want to create a Hoverable Dropdown to sort my results by name or date dynamically. Previously i had a dropdown created by using  and  tag in which everything was working fine</p>
  
  <p>My code was:    </p>
  
  <pre><code>&lt;select name="sort-by" id="sort"&gt;
        &lt;option value="name" &lt;?php if($orderby == 'name') echo "selected='selected'";?&gt;&gt;name&lt;/option&gt;
        &lt;option value="date" &lt;?php if($orderby == 'date') echo "selected='selected'";?&gt;&gt;date&lt;/option&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>which i have changed to </p>
  
  <pre><code>    &lt;div class="sort"&gt;
      &lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;name&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;date&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>which has converted to a Hoverable Dropdown. But now the problem is how would the code know that i have clicked on a link and hence pass a value $orderby which i am fetching on another page by using if(isset($_POST[order_by])) to use in a sql query ?</p>