0

$_SESSION['Active'] = 1; I have defined this in my login.php file.

if($_SESSION['Active'] ==1){ I am checking if this exists in my AdminControl File

    echo "Hello"; when I login this works.
}


if (isset($_POST['submit'])) { this is the code that I used for going back to the AdminControl Page

    header("Location: AdminControl.php");
   exit();
}

When I go back to the Admin Control the Hello disappears.

In this picture you can see that there is not Hello No title

EternalHour
  • 8,308
  • 6
  • 38
  • 57
Zain Ahmad
  • 53
  • 7

1 Answers1

0

on your admin control page you could add the following.

    <?php if(isset($_SESSION['Active']) && ($_SESSION['Active'] == '1')) { echo "Hello"; } else { echo "Something else";} ?>

Hope this helps you.

Sheepherder
  • 47
  • 1
  • 2
  • 10