How to change the elements in the page base on user who is logged in
<p>Please give me an idea on how to display elements in a page depending on who is logged in. For example, a user or an administrator.
I'm thinking of something like this but I get a parse error, what do I lack in this code?:</p>

<p><strong>EDIT:</strong>   </p>

<pre><code> &lt;?php

session_start();

if (!(isset($_SESSION['loginAdmin']) &amp;&amp; $_SESSION['loginAdmin'] != '')) {
header ("Location: loginam.php");
}

else if (!(isset($_SESSION['loginAdmin']) &amp;&amp; $_SESSION['loginAdmin'] =='')) { 
                                                 include('head2.php');  
                                                   }


else if (!(isset($_SESSION['login']) &amp;&amp; $_SESSION['login'] != '')) {
header ("Location: login.php");
}

else if  (!(isset($_SESSION['login']) &amp;&amp; $_SESSION['login'] =='')) { 
                                            include('head3.php');
                                                   }    

?&gt;    
</code></pre>

<p>Please help, there's no error but its not functioning properly. Whenever I try to access the page where I have this code. And login as a user. It redirects to loginam.php(the page where the admin will login). But there's no problem when I log in as admin. It works properly. What do I do?</p>
