Search


Submit Article

If you would like to submit an article, click the button below.

Navigation


<-- Back to Current Category

PHP & User Login Authentication

By: Oland Whitecotton, Fri Dec 9th, 2005 11:53:08 AM

PHP can be used to check if login fields match in a database. Built in functions allow advanced methods of user authentication to be used. A simple example of a user login authentication script consists of 4 main parts.


The first part is retrieving the posted variables and assigning them names descriptive of their values. The next part is confirming the variables aren't empty. Then search the database for matching login name, and running password comparison checks if the name is found. Depending on the validity of the username and password, three different pages can be dynamically rendered to the user. One is a successful login, another is a page saying username/password incorrect, and the last one saying username not found and offering them a link to create an account.

About the author: Professional website developer at simplyPHP.com.

(Article continued below)

 

Sign In

Username:
Password:
 No account yet?

 



 
Home | Contact Us | XML SiteMap
Free Articles © 2004 - 2008 - Information Articles