title: Linking logout button in html to logout php
body: <p>Does anyone know why my logout button isn't working? I have created a button in my HTML which looks like this:</p>
  <pre><code>&lt;button  href=&quot;logout.php&quot;&gt;Logout &lt;/button&gt;
  </code></pre>
  <p>And then I have a PHP file called logout.php which looks like this:</p>
  <pre><code> &lt;?php
  session_start();
  
  if(session_destroy()) {
    header(&quot;Location: index.html&quot;);
  }
  ?&gt;
  </code></pre>
  <p>I don't know how to connect the two. If anyone could help me that would be great.</p>