[PHP] function problems...
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'] = trtdhr width=\90%\ color=\#99\ align=\left\/td/tr; } elseif (($lvl != admin) || ($lvl == user) || ($lvl != view)) { $_SESSION['menu'] = trtda href=\login.hosts.php\ onmouseover=\window.status='Edit current static hosts for each VLAN';return true\buManage hosts/u/b/a/td/tr trtda href=\login.run.php\ onmouseover=\window.status='Updates current DHCP configuration - YOU MUST VISIT HERE FOR CHANGES TO TAKE EFFECT!!!';return true\buUpdate DHCP/u/b/a/td/tr trtdhr width=\90%\ color=\#99\ align=\left\/td/tr; } elseif (($lvl == admin) || ($lvl != user) || ($lvl != view)) { $_SESSION['menu'] = trtda href=\login.global.php\ onmouseover=\window.status='Edit current DHCP global settings';return true\buGlobal DHCP config./u/b/a/td/tr trtda href=\login.vlans.php\ onmouseover=\window.status='Edit current DHCP VLAN's';return true\buManage VLANS/u/b/a/td/tr trtda href=\login.hosts.php\ onmouseover=\window.status='Edit current static hosts for each VLAN';return true\buManage hosts/u/b/a/td/tr trtda href=\login.run.php\ onmouseover=\window.status='Updates current DHCP configuration - YOU MUST VISIT HERE FOR CHANGES TO TAKE EFFECT!!!';return true\buUpdate DHCP/u/b/a/td/tr trtdhr width=\90%\ color=\#99\ align=\left\/td/tr trtda href=\login.users.php\ onmouseover=\window.status='Manage users authorized to work on the DHCP services';return true\buUsers/u/b/a/td/tr trtda href=\login.logs.php\ onmouseover=\window.status='Manage the logs used to prevent unauthorized access to DHCP services';return true\buLogs/u/b/a/td/tr; } else { $_SESSION['menu'] = trtdhr width=\90%\ color=\#99\ align=\left\/td/tr; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function problems...
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