WilliamMute007
Programmer
Hi All,
Any chance I can get help with this code please? Am not sure what I am doing wrong but I cant seem to figure out why its not working as it should. I want this verification page to check if a stored session value is say for example 'Director' if so, then navigate them to whatever page depending on the session content else navigate them to a login page.
Any chance I can get help with this code please? Am not sure what I am doing wrong but I cant seem to figure out why its not working as it should. I want this verification page to check if a stored session value is say for example 'Director' if so, then navigate them to whatever page depending on the session content else navigate them to a login page.
Code:
if ($_SESSION['loggedin']==Director) {
header('Location: directors_files.php'); //redirects after successful check
exit;
}
elseif ($_SESSION['loggedin']==Consultant) {
header('Location: consultant_files.php'); //redirects after successful check
exit;
}
else {
header('Location: login_form.php');
}