Php Logout Issue
<p>I've a admin panel and user panel. Both have a Logout link. When I login to admin panel and in the mean time i login as a user. So both have a session. </p>

<p>But when i logout from admin panel it's also logged from user panel. Why it's logout from user. I did seperate login session.</p>

<p><strong>Login Session for Admin and User:</strong></p>

<pre><code>$_SESSION['admin_u'] = $admin_uname;
$_SESSION['admin_pass'] = $admin_pass2; 
</code></pre>

<p>and</p>

<pre><code>$_SESSION['uname'] = $uname;
$_SESSION['pass'] = $pass;  
</code></pre>

<p><strong>Admin Logout code:</strong></p>

<pre><code>&lt;?php
if(isset($_SESSION['admin_u']) &amp;&amp; isset($_SESSION['admin_pass'])) {
    session_unset($_SESSION['admin_u']);
    session_unset($_SESSION['admin_pass']);
    session_destroy();
    header( "Location:../index.php" );
    exit();     
} else {
    header("Location:../membersignin.php");
    exit();
}
?&gt;
</code></pre>

<p><strong>User Logout code:</strong></p>

<pre><code>&lt;?php
if(isset($_SESSION['uname']) &amp;&amp; isset($_SESSION['pass'])) {
    session_unset($_SESSION['uname']);
    session_unset($_SESSION['pass']);
    session_destroy();
    header( "Location:../../index.php" );
    exit();     
} else {
    header("Location:../../membersignin.php");
}
?&gt;  
</code></pre>

<p>Is there anything wrong in my code?</p>
