parse error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

parse error

Post by m2babaey »

Hi
I am getting error on this function: (2nd line)

Code: Select all

function publishersOnly() {
		if (!('10' < $_SESSION['permission'] < '30')|!$_SESSION['logged']) {
			$_SESSION['log_to'] = $_SERVER['REQUEST_URI'];
			die('This page is available only to registered publishers,
				you have to <a href="login.php">login</a> first, if ' .
				"you haven't" . ' <a href="signup.php">registered</a> ' .
				 'yet you can do that for free.');
		}
	}
do yuo know what the problem is ?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You cannot test x < y < z
but e.g. x < y && y < z
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The choice of using a bitwise OR is interesting too. :?
Post Reply