I saw in school a system that set permissions using binary string.
Let\'s say 101001 = 41
So :
Here is a nice snippet. taken from here http://www.litfuel.net/tutorials/bitwise.htm
";
if ($mike & 32) {
echo 'YES MIKE CAN EDIT';
} else {
echo 'NO HE CANNOT';
}
echo "
Is Jim Allowed to edit? he has an access level of 96
";
if ($jim & 32) {
echo 'YES JIM CAN EDIT';
} else {
echo 'NO HE CANNOT';
}
?>