如何在用户登录时显示用户特定功能?
我正在尝试为我的咨询实践网站编写代码。我知道如何拥有数据库以及如何管理网站上的用户。但现在我想向用户收取他们希望我从头开始构建的自定义功能的费用。 (例如,他们想要一个上传图片的选项或通过第 3 方 API 获取某些报告的能力,这对于本示例来说是唯一的)所以,我的问题是当他们使用他们的 ID 登录时,我如何编写一个 php 代码仅显示该特定用户的特定选项/功能/页面?
I am trying to write code for a site for my consulting practice. I know how to have a database and how to manage users on the site. But now I want to charge users for custom features they want me to build from ground up. (e.g they want an option to upload pictures or ability to get certain reports via 3rd party API, which for purposes of this example is unique) So, my question is when they log in with their ID, how do i write a php code that shows only that particular option/features/page for that particular user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何在会话中跟踪登录用户?您可以做一些简单的事情,例如:
仅为特定用户嵌入特定代码块(或从数据库中提取该用户列表)...
How do you track the logged in user, in a session? You could do something simple like:
To embed a certain block of code only for a certain user (or pull that user list from the database)...