doulian5857
2016-12-31 19:31具有不同权限的mySQLi和PHP登录系统
I'm pretty new to PHP and I need to make a login system and I need to check if the user has certain permission, then show something on the page. Let me give a pseudo-code example:
IF USER HAS PERMISSION "CONTACTS" OR USER HAS PERMISSION "ALL"
SHOW CONTACTS LINK
I've been using DevDojo's php login script, and I wanted something similar or an adaption of that code with a multi-level system.
I've tried many things here on SO but none of them really fit my needs, I need to use something like if $user->hasPermission("contacts")
. because as I have many features, levels like 1, 2 and etc. won't fit, and admin or not also won't. I'm pretty newbie, so explanation is welcome! Thanks in advance.
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 检查用户是管理员还是普通用户? PHP $ _session和MYSQL
- mysql
- php
- 4个回答
- 不同的usertypes具有不同的mysql访问权限
- mysql
- php
- 2个回答
- mysql_connect:访问被拒绝
- mysql
- php
- 2个回答
- 具有不同权限的mySQLi和PHP登录系统
- mysql
- php
- 1个回答
- 连接DATABASE错误类型:2002:权限被拒绝
- curl
- mysql
- php
- 1个回答
换一换