User Login
Moderator: General Moderators
-
yoursanjay
- Forum Newbie
- Posts: 17
- Joined: Sat Feb 23, 2008 12:21 pm
User Login
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.
Re: User Login
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.
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.