Confused a little with = to and grater than ...
| From: | Philip J. Newman | Date: | Sun, 16 Mar 2003 01:28:49 +0000 |
| Subject: | Confused a little with = to and grater than ... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-139823@lists.php.net to get a copy of this message | ||
Well i thought about changeing access levels into numbers so that only
LARGER numbers can access lower numbers and Lower numbers can't access
anything higher ... if that makes sence ...
So 3 can access 2 and 1,
2 can't access 3, but can access 2 and 1 and one can't access 2 or 3, but
can 1 ...
assuming that $siteAccessLevel is = to eather level-1, level-2 or level-3
...
if ($slevel >= $glevel) {
is the line i can't seem to get right.
*GRIN* any help? code below.
if ($siteAccessLevel == "level-1") { $slevel = "1"; }
else if ($siteAccessLevel == "level-2") { $slevel = "2"; }
else if ($siteAccessLevel == "level-3") { $slevel = "3"; }
if ($gAccessLevel == "level-1") { $glevel = "1"; }
else if ($gAccessLevel == "level-2") { $glevel = "2"; }
else if ($gAccessLevel == "level-3") { $glevel = "3"; }
if ($slevel >= $glevel) {
//LOAD PAGE
} else {
// ERROR MESSAGE HERE.
{
------
Philip J. Newman.
Head Developer
info@philipnz.com
+64 (9) 576 9491
+64 021-048-3999
------
Friends are like stars
You can't allways see them,
but they are always there.
------
Websites:
PhilipNZ.com - Design.
http://www.philipnz.com/
info@philipnz.com
Philip's Domain // Internet Project.
http://www.philipsdomain.com/
newmanpj@philipnz.com
Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
philip@newman.net.nz