title: One query string for both ascending and descending sort operations
body: <p>I'm using the following logic to sort the data read from an SQL database- </p>
  
  <pre><code>&lt;a href='string_functions.php?sort=desc'&gt;Sort By Type&lt;/a&gt;
  &lt;?php  
      if( isset( $_GET['sort'] ) and $_GET['sort'] == 'desc')  {
          $query = "SELECT * FROM `function list` ORDER BY `function type` DESC";
      } else {
          #Read from Database
          $query = "SELECT * FROM `function list`";
      }
      $data_buffer = $conn -&gt; query($query);
  ?&gt;
  </code></pre>
  
  <p>I'm then using <strong><code>$data_buffer</code></strong> to display the tuples from the table <strong><code>function list</code></strong></p>
  
  <p>I want to make -</p>
  
  <pre><code>&lt;a href='string_functions.php?sort=desc'&gt;Sort By Type&lt;/a&gt;
  </code></pre>
  
  <p>to toggle for both <strong>ASC</strong> and <strong>DESC</strong> operations. Is it possible to do so?</p>
  
  <p>I'm aware that I can use two links like - </p>
  
  <pre><code>&lt;a href='string_functions.php?sort=asc'&gt;Sort By Type&lt;/a&gt;
  &lt;a href='string_functions.php?sort=desc'&gt;Sort By Type&lt;/a&gt;
  </code></pre>
  
  <p>each for different operations, but is it possible to do so by using just one link?</p>