Session not destroy after logout in php
<p>I have research a lot and I have yet to find the solution to my problem. I clik a link for the user to logout the user then is redirected to the login page. The problem is that when the user is redirected it still logged in. This is my code to logout the user.</p>

<pre><code>session_start();
  $_SESSION = array(); //destroy all of the session variables
  unset($_SESSION['valid']);
  unset($_SESSION['userid']);
  unset($_SESSION['username']);
  session_destroy();
  Header("Location:login.php");
  exit;
}
</code></pre>
