About session expire if user don't do any action for sumtime
<p>Can anyone give be the code of session expire if user dont do any activity for 15mins, if no activity[like mouse move,scroll,click] is done then the session should expire </p>

<p>I have tried the following:</p>

<pre><code>$_SESSION['start'] = time();
$_SESSION['expire'] = $_SESSION['start'] + (45 * 60);
if(isset($_SESSION['luser'])) 
{ 
    $now = time(); 
    if($now &gt; $_SESSION['expire']) 
    { 
        session_destroy(); 
        echo "Your session has expire ! &lt;a href='login.php'&gt;Login Here&lt;/a&gt;"; 
    } 
    else 
    { 

    }
}
</code></pre>
