Just as another note you can use:
That will check for an null value. If you would like an example of a session I can give you a good one. I always set a unique session value when it is registered to show whether they are logged in or not. like this:Code:if (empty(userQueryArray))
Then on each page you can call this:Code:$_SESSION['logged_in'] = true;
Code:if($_SESSION['logged_in'] == false) { header("location:login.php"); //redirect to login page } else { //code to be show if they are logged in }




Reply With Quote