I have two different user roles, one is Member and the other is Secretary and I need to be able to allow access to a php page if either Member or Secretary is logged in. I originally had the code below which worked if a Member role was logged in
<?php
session_start();
// If the user is not logged in redirect to the login page...
if(!isset($_SESSION["account_loggedin"]) || $_SESSION["account_loggedin"] !== true || $_SESSION["account_role"] != 'Member') {
include('includes/baseurl.php');
$title = "Show Diary - The British Rabbit Council";
$pgDesc="";
include ( 'includes/header.php' );
?>
I added the Secretary role to the code but it won’t allow me to access the page, I think it’s because I’m not logged in as a Member role and am logging as the Secretary role but I need access to the php page if I am logged in as either Member or Secretary
The current code I have is below
<?php
session_start();
// If the user is not logged in redirect to the login page...
if(!isset($_SESSION["account_loggedin"]) || $_SESSION["account_loggedin"] !== true || $_SESSION["account_role"] != 'Member' || $_SESSION["account_role"] != 'Secretary') {
include('includes/baseurl.php');
$title = "Show Diary - The British Rabbit Council";
$pgDesc="";
include ( 'includes/header.php' );
?>
Can anyone help please, thank you in advance