SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Membership management with password encryption

We will learn here how to store encrypted password in the table. Before this in our basic Member signup & login script we have used varchar field to store the passwords of the users. For better security of our software we will encrypted the password by using MD5 encryption and then store the hash of the password string in the table. With this modification managing the script became little different as we can't retrieve the lost password. This part we will discuss separately at the second part of membership script. Now for this modification we have to change our basic membership signup script so we will discuss here what changes / updating are required to our pages for adding this feature.

Length of the password field to store MD5 encrypted password In the present membership management software we have increase the filed size to 32. A varchar field of 32 lengths is required to store our passwords.

Signup page
While inserting the member details to our member table we have to encrypt the password of the member before storing them in the table. Like this .

$password=md5($password); // Encrypt the password before storing
$query=mysql_query("insert into plus_signup(userid,password,email,name,sex) values('$userid','$password','$email','$name','$sex')");


While checking the signup details of the member we have to check the email address used by the member is already there with us or not. So one more check above the other checks are added ( in comparison to basic script )

Login page
Here we will be asking the visitor to enter his / her login id and password. Before checking the password with the table we have to encrypt it and then match the encrypted password along with the userid against the stored id and password in our membership table.

Change password page
Here once the password validation is cleared, we have to encrypt the password and then update the table with new password.

Forgot password feature. This is the most important part in member signup script where password is encrypted. We can't retrieve the lost password so we will use one activation key. We will discuss in detail in next section Part II.

Download the ZIP file for online membership management script with encrypted password

Discuss this tutorial at forum


Further readings
Online membership management script
Posting Activation key for lost encrypted password to the email address
Creating a signup page and storing member details in MySQL
Storing signup data in a table
Collecting the data if register global is off for signup script
Changing or updating password by the logged in member
Forgot password feature in member signup script
Basic login form
Login script to authenticate user from a mysql table data
Checking the status of user for login or logged out
Updating member profile inside member area
Finding out who are online








 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
PHP Tutorial Index
Popular Tutorials
Drop down list
File Upload
Signup script
Member Login
Line Graph
PHP MySQL Paging
PHP Calendar
PHP Tutorials
Date & Time
Array
String Functions
Math Functions
Form Handling
File Handling
Comment Posting
Content Management
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.