Web Development

How to maintain the password history using php and mysql

In this tutorial I will explain how to maintain password history using php and mysql. This means a user who must change their password can’t reuse the password they just had. This tutorial explains how user new Password should not be same as any of the prevoius 3 Passwords.

This tutorial include three pages

  • Index.php
  • Change-password.php
  • Config.php

And includes two tables

  • tblregistration
  • tblpasswordhistory

Structure of table tblregistration

Structure of table tblpasswordhistory

index.php page include registration and login form

Code for Registration-

Code for login

Code for change password

Details for Demo—–

Login Details
Email — anuj@gmail.com
Password– Test@12345
Last two password—  Test@123 and Test@1234

Download Source Code(How to maintain the password history using php and mysql)
Size: 15 KB
Version: V 1.0

About the author

Anuj kumar

I'm Anuj kumar a web developer with 4+ year experience .I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to is provide php , jquery , mysql , phpoops and other web development tutorials. I am trying best effort to make PHPGurukul useful for every single moment spend on this website. If you think this website is useful to visit please share with your friend and buddies.