users see only their contacts

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andydeans
Forum Newbie
Posts: 6
Joined: Thu Aug 27, 2009 8:01 am

users see only their contacts

Post by andydeans »

hi,

could anyone point me to a tutorial or any help on having users see their own contacts only?

basically have a contacts database and want to have it so the agents login and can see their contacts only but admin can see alll and add notes to?

any help please.

many thanks

andy
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: users see only their contacts

Post by dejvos »

Hi,

you should use sessions:
http://us.php.net/manual/en/reserved.va ... ession.php

than you have to estabilsh database with user a and permissions ( I recommand two tables users and perrmissions).

Your user will have to log in and then you can get his role throught $_SESSION['somethink'].

Everythink clear?

Bye
andydeans
Forum Newbie
Posts: 6
Joined: Thu Aug 27, 2009 8:01 am

Re: users see only their contacts

Post by andydeans »

thanks for the help.
Post Reply