I have created a cookie using php and now I need to create a button the user can click to log out.
This would be the php code to unset the cookie:
unset($_COOKIE['access_token']);
But I’m a quite stuck with how to make the button functionality. Can anyone help me with it?
Thanks a lot
if(isset($_GET['logout'])) {unset($_COOKIE['access_token']);header('Location: /');exit;}on site
<a href="?logout">logout</a>