Re: Different User Levels
| From: | Jason Brooke | Date: | Mon, 25 Dec 2000 09:59:31 +0000 |
| Subject: | Re: Different User Levels | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31784@lists.php.net to get a copy of this message | ||
you need bit operators, not functions
both php and mysql have these - you'll find info on them in their manuals
> Hello,
>
> I am trying to establish a way to use a fmall value for defining user
> privileges for my system, out of our MySQL database...
>
> I would like to know what functions in PHP would allow me to do something
> such as:
>
> 2 = View Privilege
> 4 = Write Privilege
> 8 = Delete Privilege
> 16 = Edit Privilege
>
> Therefore, View + Edit would be Level (2+16) = 18.
>
> I know that there is a way of doing this, but the function name slipped my
> mind, and no matter for how long i stare at the PHP manual, I cannot
manage
> to find it...
>
> any help greatly appreciated!
>
> Thanks!