Logic of conditionals and the ( ) operators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In a nutshell:

Will this work?

if ($perm == (11 || 12))


Explanation:

I am laying the groundwork for a photo viewing system with a private and
public mode, and additionally if an admin is logged in, there is an
additional level of permission. I came up with a number system to make it
easier (and is calcualted by a class) so now, instead of checking against
the $mode variable, if the user is logged in, and then what their user level
is if they are logged in, I just check against some numbers (the class
evaluates all those conditions and assigns the appropriate number a single
permission variable, $perm.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux