dqwn64004 2014-02-13 23:19
浏览 27

PHP MySQL使用与登录用户相同的页面显示其他用户配置文件?

So currently on my member website, I'm doing things the easy way and using the same page for every users profile, just using the $_SESSION code to bring up different user information depending on the current logged in user.

My question is, how would I bring up other users information? Say if I was searching through the members, clicked a name it should bring up their profile, how could I get that working if I don't have separate pages for each member? Any ideas?

  • 写回答

2条回答 默认 最新

  • dongxie45083 2014-02-14 00:08
    关注

    Use a post or get variable of the members ID to display a generic "public" member page for each member, then only display the special "private" features to the user who has a matching Session ID to that member ID. You will have to check the member ID against the session ID each time you are about to echo something "private". When he views other members the ID wont match so he will only see their "public" page and vice versa.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度