PHP

How to change Password in php

In this tutorial I will explain how user can change their old password.First Create a html form with three fields.

  • Old Password
  • New Password
  • Confirm Password

Now Validate these fields with javascript. After this create a php script for change password . PHP script given below :

HTML code for Change Password Form

Javascript Validation for change Password

Script for Change Password

Structure of userinfo Table

View Demo

Download Source code(How to change Password in php)
Size: 209 KB
Version: V 2.0

How to run this script
1. Download and Unzip file on your local system.
2. Put this file inside root directory
3. Database Configuration

Database Configuration
Open phpmyadmin
Create Database test
Import database userinfo.sql (available inside zip package)
put this url in the browser http://localhost/changepassword

Login details

Username  : admin@test.com

Password : Test@12345

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.

Leave a Comment

3 Comments

Subscribe For Latest Updates