Hi,
I have a "check_login" function which checks whether the user is logged in or not and if it isn't, redirects them to "login.php". When I try going to the page whilst logged in, it displays as it should. However, when I'm logged out and I try it, instead of sending me to the "login.php" page, it displays "The page isn't redirecting properly: Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
Here is the check_login function:
function check_login() {
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
}
}
Any help would be much appreciated.