drzrdc1766788 2014-03-01 17:55
浏览 34
已采纳

如何隐藏某些用户的某些网页或链接?

My tool uses:

  1. PHP for scripting.
  2. mySQL for DB.
  3. Apache for host.

There will be 2 groups of users.

I want to give access to 1 group of users only for 2 webpages. The other group of users will have the access for all the pages and links. Is there a way I can hide certain links on a webpage from a certain group of users, too.

How can I achieve this.
Fairly new to programming.
Any help will be greatly appreciated.

Thank you.

  • 写回答

4条回答 默认 最新

  • ds19891231 2014-03-01 18:02
    关注

    Lets say, Admin & normal user.... in that case we will have a column in the user table which will store he/she is admin or not. When you do authentication, fetch this value & keep it in SESSION. So in every page you check this person is admin or not with that session value using if clause.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统