Originally Posted by
leenakrishna
hai,
I'am ne wto PHP and iam doing a project.I want a login,in such a way that each one entered should be identified (i.e,whether the entered person is a client or admin )and they should be directed to their respective pages.What is the code i have to use.anybody there to help me.....
I realize this is an old thread and you may have already found the answer, but the most general answer I can give--because I'm not going to code it for you--is you have to use sessions with the $_SESSION array. To identify the group ID of the user, you have to use a database.
You'll first have to check if a session is already started, and if not, prompt the user to login and check their input against the corresponding record in the database. If it chechks out, start a session with session_start()
The easiset way to do all of this is use RAD tool. This code is so commonly used, you'd just be reinventing the wheel if you were to write it on your own. I use CodeCharge Studio, they have templates that do all of the generic stuff for you, you just add the special code where need be. And if you can't do that, search Google Code for snippets, I guarantee you'll find what you're looking for.