Session time out in PHP
<p>HI,
i have code for session time out but i dont know whats the issue its not working someone pls look at this and help me. Here is the code:</p>

<pre><code>  $inactive = 10;

  // check to see if $_SESSION['timeout'] is set

  if(isset($_SESSION['timeout']) ) {

  $session_life = time() - $_SESSION['timeout'];

  if($session_life &gt; $inactive)

  { 
      session_destroy(); 
      header("Location: logoutpage.php"); }
   }

  $_SESSION['timeout'] = time();
</code></pre>

<p>Thanks.</p>
