User Login

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
yoursanjay
Forum Newbie
Posts: 17
Joined: Sat Feb 23, 2008 12:21 pm

User Login

Post by yoursanjay »

What is the concept of User Login and how is PHP script associated with the Login function? Plz give me a reference to understand the Login procedure.
Dynamis
Forum Contributor
Posts: 122
Joined: Thu Jul 10, 2008 3:15 pm
Location: Indiana, US

Re: User Login

Post by Dynamis »

Well to start, here is the first tutorial I found with google, here, I'm sure many others could be found if this one isn't the greatest.

As for the concept, the whole idea of letting a user login is to keep track of information about/for that user specifically.

How PHP is associated with the login function:
You create a form in html. This form is then handled by a php script that checks the validity of the username & password. It then accesses a database, or other data storing file, to see if the password entered is the password for that specific username. If it is, the script then logins in the user. This is done using a session. You can set session variables, such as $_SESSION['logged_in'] = true, and then on every page check if that variable is true. If it is, display the information for that specific user, else redirect to the login page perhaps.
Post Reply