log out function not working (session not killed)
<pre><code>function killsession()
{
  //  global $_SESSION;
    $_SESSION = array();
    if (session_id() != "" || isset($_COOKIE[session_name()])) {
        setcookie(session_name(), '', time() - 42000, '/');
    }
    session_unset();
    session_destroy();
    header("Location: "index");

}
</code></pre>

<p>Any ideas why $_SESSION['userid'] still stands after I run this function? I literally stay logged in.</p>

<p>Session name and start() is set at the top of every page.</p>
