Page 1 of 1

parse error

Posted: Tue Aug 07, 2007 2:48 am
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 ?

Posted: Tue Aug 07, 2007 3:03 am
by volka
You cannot test x < y < z
but e.g. x < y && y < z

Posted: Tue Aug 07, 2007 2:31 pm
by feyd
The choice of using a bitwise OR is interesting too. :?