I'm writing an authorization check to make sure a user is still logged in when viewing an admin page. When logged in, session variables were set containing the users username and ip. When I run the following code, I get this error:
Parse error: parse error, unexpected T_STRING in /mounted-storage/home/sub005/sc10664/www/chaz/sor/update.php on line 4
I know this error is usually caused by a syntax-error (no pun intended), but I can't find one in the code.
<?php
session_start();
$newip = $_SERVER['REMOTE_ADDR'];
if (!isset($_SESSION['username']) ¦¦ empty($_SESSION['username']) ¦¦ $newip!= $_SESSION['ip']) { //line 4
$auth = "You have been logged out or were not logged in. Please click <a href='login.php'>here</a> to return to the login form.";
}else {
$auth = "You are still logged in!";
}
?>
<html>
<head>
<title>Add News</title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php echo $auth; ?>
</body>
</html>
Does anyone see what's wrong? Thanks.