I have the following two links:

```
<a href="index.php?showDesktop=true">Show Desktop</a>

<a href="index.php?showMobile=true">Show Mobile</a>

```

What I want to do is make it so that if the showDesktop query is clicked then create a cookie called showDesktop and delete the cookie showMobile and the vice-versa. I have tried the following so far, but think I'm doing it wrong. Can anyone help me get this working as proposed.

```
if($_GET['showDesktop']) {
    $_COOKIE('showDesktop', 'yes');
    $_COOKIE('showMobile', null);
}
else if($_GET['showMobile']) {
    $_COOKIE('showDesktop', null);
    $_COOKIE('showMobile', 'yes');
}

```