I'm using the following logic to sort the data read from an SQL database- 

```
<a href='string_functions.php?sort=desc'>Sort By Type</a>
<?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 -> query($query);
?>

```

I'm then using **`$data_buffer`** to display the tuples from the table **`function list`**

I want to make -

```
<a href='string_functions.php?sort=desc'>Sort By Type</a>

```

to toggle for both **ASC** and **DESC** operations. Is it possible to do so?

I'm aware that I can use two links like - 

```
<a href='string_functions.php?sort=asc'>Sort By Type</a>
<a href='string_functions.php?sort=desc'>Sort By Type</a>

```

each for different operations, but is it possible to do so by using just one link?