Does anyone know why my logout button isn't working. I have created a button in my html which looks like this
<button href="logout.php">Logout </button>
And then I have a php file called logout.php which looks like this.
<?php
session_start();
if(session_destroy()) {
header("Location: index.html");
}
?>
I don't know how to connect the two, if anyone could help me that would be great. Thanks