How to change the elements in the page base on user who is logged in
- by user225269
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?:
<?php
session_start();
if (!(isset($_SESSION['loginAdmin']) && $_SESSION['loginAdmin'] != '')) {
header ("Location: loginam.php");
}
if else (!(isset($_SESSION[['loginAdmin']) && $_SESSION['loginAdmin'] =='')) { ?>
<?php include('head2.php'); ?>
}
<?php
if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {
header ("Location: login.php");
}
if else (!(isset($_SESSION[['login']) && $_SESSION['login'] =='')) { ?>
<?php include('head3.php');
}
?>
Please help