I\'m pretty new to php and I am trying to figure out how to use sessions to check and see if a user is logged into a website so that they would have authorization to access
Need on all pages before you check for current sessions
session_start();
Check if $_SESSION["loggedIn"] (is not) true - If not, redirect them to login page.
$_SESSION["loggedIn"
if($_SESSION["loggedIn"] != true){ echo 'not logged in'; header("Location: login.php"); exit; }