不同类型用户的个人资料页面 [英] Profile page for different types of users

查看:87
本文介绍了不同类型用户的个人资料页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想知道是否可以将用户发送到不同的页面(例如clientProfile.php),如果他们正在尝试的配置文件访问是一个客户端(与自由职业者相关)。



例如:



如果我有一个清单数据库中的所有自由职业者(用户数据库表中的type = freelancer),我点击他们的用户名(这是他们的个人资料的链接),它会将用户发送到freelancerProfile.php?$ username



但是,如果我有一个数据库中所有客户端的列表(在用户数据库表中键入=客户端),我点击他们的用户名(链接到他们的个人资料)我希望用户被发送到clientProfile.php?$ username



原因是我希望客户和自由职业者页面向用户显示不同的内容。例如。我希望自由职业者能够显示简历,但这不是我的客户资料页面所必需的。



我还没有任何代码,因为我想知道它是否是在我开始之前可行。



谢谢,



Joel。

解决方案

用户名



但是,如果我有一个数据库中的所有客户端列表(在用户数据库表中键入=客户端),我单击在他们的用户名(链接到他们的个人资料)我希望用户被发送到clientProfile.php?


用户名



这是因为我希望客户端和自由职业者页面向用户显示不同的内容。例如。我希望自由职业者能够显示简历,但这不是我的客户资料页面所必需的。



我还没有任何代码,因为我想知道它是否是在我开始之前可行。



谢谢,



Joel。


< blockquote>您好,



我已经确定了您的要求,您需要实施基于角色的身份验证,这将帮助您实现所需要的。



如需参考,请点击以下链接:

http://www.sitepoint.com/role-based-access-control-in-php/ [ ^ ]





您也可以使用这个简单的开源存储库来完成工作。

http://sourceforge.net/projects/ roledbasedlogin / [ ^ ]





如果您需要更多帮助,请告诉我。



谢谢和问候,

Zeeshan。


Hi,

I'm wondering if its possible to send the user to a different page (e.g. clientProfile.php) if the profile that they are trying to access is a client (as apposed to freelancer).

example:

If I have a list of all freelancers in a database (type=freelancer in user database table) and I click on their username (which is a link to their profile) it will send the user to freelancerProfile.php?$username

However, If I have a list of all clients in a database (type=client in user database table) and I click on their username (linked to their profile) I want the user to be sent to clientProfile.php?$username

The reason for this is because I want clients and freelancers pages to display different things to the user. E.g. I want freelancers to be able to display a CV but that isnt necessary for my client profile page.

I dont have any code yet as I want to know if it is doable before I start.

Thanks,

Joel.

解决方案

username

However, If I have a list of all clients in a database (type=client in user database table) and I click on their username (linked to their profile) I want the user to be sent to clientProfile.php?


username

The reason for this is because I want clients and freelancers pages to display different things to the user. E.g. I want freelancers to be able to display a CV but that isnt necessary for my client profile page.

I dont have any code yet as I want to know if it is doable before I start.

Thanks,

Joel.


Hi,

I have identified what is your requirement and you need to implement Role based authentication that will help you achieve what you require.

For your reference follow some of the links below :
http://www.sitepoint.com/role-based-access-control-in-php/[^]


You can also use this simple open source repository to get your work done.
http://sourceforge.net/projects/roledbasedlogin/[^]


Let me know if you need more help.

Thanks and Regards,
Zeeshan.


这篇关于不同类型用户的个人资料页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆