Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
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.
Posted
Comments
Sergey Alexandrovich Kryukov 30-Jan-14 17:38pm    
I don't see the problem. By PHP (or any other server-side technology) you generate the content you want. Why not putting one or another link, depending on data?
—SA

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900