i keep getting the error Undefined variable: _SESSION and don’t understand why could someone help me the start session is included in header.php
[php]<?php
include ‘mysql.php’;
//the user has admin rights
$name = isset($_POST[‘name’]) ? trim($_POST[‘name’]) : ‘’;
$description = isset($_POST[‘description’]) ? trim($_POST[‘description’]) : ‘’;
//Create variable to hold error message
$errorMsg = ‘’;
if($_SESSION[‘loggedIn’] == false | $_SESSION[‘user_level’] != 1 )
{
//the user is not an admin
echo ‘Sorry, you do not have sufficient rights to access this page.’;
}
else
{
//Check if form was posted
if($_SERVER[‘REQUEST_METHOD’] == ‘POST’)
{[/php]
header.php is the following
[php]<?php
session_start();
if ($_SESSION[‘loggedIn’])
{
echo 'Hello ’ . htmlentities($_SESSION[‘username’]) . ‘. Not you? Sign out’;
}
else
{
echo ‘Sign in or create an account’;
}
?>[/php]