I'm working on a Tenders script right now, and I'm doing very well so far, it all works, but I can't get this to get away, I'm not really sure how. i got this error
PHP Notice: Undefined index: loggedIn in /home/monaqs83/public_html/util/Auth.php on line 11
and this the Auth.php please can you help me solve this problem
<?php
/**
*
*/
class Auth
{
public static function handleLogin()
{
@session_start();
$logged = $_SESSION['loggedIn'];
if ($logged == false) {
session_destroy();
header('location: ../login');
exit;
}
}
public static function handleRole()
{
$roleArray = array(
'directorates',
'publisher',
'user',
'type',
'subcategory',
'category'
);
$url = $_SERVER['REQUEST_URI']; $url = explode('/', $url);
if($_SESSION['role'] == 1)
if(in_array($url[0], $roleArray))
header('Location: '.URL.'dashboard');
}
}