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.