Re: [PHP] function problems...

2003-12-03 Thread Richard Davey
Hello Jas,

Wednesday, December 3, 2003, 6:15:20 PM, you wrote:

J> I call this function it checks a session variable then displays 1 of 3
J> menus... for some reason it will only display the first menu regardless
J> of the results of my decoded session var.  Any help or just a new pair
J> of eyes would help.  Thanks in advance.

J>  if (($lvl != "admin") || ($lvl != "user") || ($lvl == "view")) {

I'm pretty sure this need to be:

$lvl !== "admin"

(Note: double equals sign)

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] function problems...

2003-12-03 Thread Jas
I call this function it checks a session variable then displays 1 of 3 
menus... for some reason it will only display the first menu regardless 
of the results of my decoded session var.  Any help or just a new pair 
of eyes would help.  Thanks in advance.
jas

function menu() {
	$lvl = base64_decode($_SESSION['lvl']);
	echo $lvl;
	if (($lvl != "admin") || ($lvl != "user") || ($lvl == "view")) {
			$_SESSION['menu'] = "";
	} elseif (($lvl != "admin") || ($lvl == "user") || ($lvl != "view")) {
			$_SESSION['menu'] = "Manage hosts
 Update DHCP
 ";
	} elseif (($lvl == "admin") || ($lvl != "user") || ($lvl != "view")) {
			$_SESSION['menu'] = "Global DHCP config.
 Manage VLANS
 Manage hosts
 Update DHCP
 
 Users
		 			 Logs";
	} else {
			$_SESSION['menu'] = ""; }
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php