how to avoid 'session break' in two panels
<p>i am a student and i am new in php</p>

<p>i am working on my project</p>

<p>i have two panels in my website (localhost)
one is user
other is admin</p>

<p>in both panels i hace created sessions on all pages</p>

<p>on user panel:</p>

<pre><code>session_start();
if(!isset($_SESSION['user']))
   header("Location: index.php");
</code></pre>

<p>on admin panel:</p>

<pre><code>session_start();
if(!isset($_SESSION['username']))
{
   header("Location: login.php?e=please+login+first");
}
</code></pre>

<p>now i have opened both panels
and problem is that if i logout from one panel then other panels also logout .</p>

<p>forexample if i logout in user panel as a user then my admin panel session automatically redirect page to login.php when i refresh admin page</p>

<p>is there any way to avoid this or how to avoid this.. please help me. i shall be thankful</p>

<pre><code>here is my logout code

for admin side

&lt;?php
session_start(); 
session_destroy();
header("Location: login.php?e=Logout+successfully");
?&gt;

for user side
&lt;?php
session_start();
session_destroy();
header("Location: index.php?l=Logout+successfully");
}
?&gt;
</code></pre>
