Parse error: parse error, unexpected T_ELSE in /srv/www/htdocs/#######/includes/check-loggedin.php on line 13
Perhaps it's coz it's after midnight and tomarrow I'll call myself stupid, but I can't find out why it causing an error.
Can anyone see it?
Thanks
PHP:
<?php
// this checks that if a user is trying to access a page where they should be logged in that they are actually logged in
// lets see if session is set, if not then they are using anonimous proxies, in which case we don't want them on the site
if (isset($_SESSION)) ($_SERVER['SCRIPT_NAME']) != "/login.php";
{
// ok, so, the sesion does exist now look to see if their email is set
if (!isset($_SESSION['USER_EMAIL']))
{
// ### need to check if they allready are at the login page... lol ###
// email is not set, theirfor they have not logged in so we bounce them to the login page
header("Location: login.php");
}
} else
// The session is not set, their is something seriously wrong, so we bounce them to the login page anyways
{ header("Location: login.php");
} ?>
Perhaps it's coz it's after midnight and tomarrow I'll call myself stupid, but I can't find out why it causing an error.
Can anyone see it?
Thanks