4th quarter 18 php & my sql change password page

Preview:

DESCRIPTION

php & my sql change password page

Citation preview

PHP & MySQL(Registration Page)

by: Engr. Esmeraldo T. Guimbarda Jr.

Activity:

Open Xampp Control Panel:

Check running services of XAMPP.

Open your web browser and type in localhost/phpmyadmin

1. Click Database2. write section as name of your database3. then click Create

As you can see, the database named section is created. Now click the database section

1. By clicking section name we automatically making a new table2. Input name as login3. Input number of columns as 34. Then click Go

1. Input the following data:

2. Click Save

Note: That Auto-increment allows a unique number to be generated when a new record is inserted into a table.

Name Type Length/Values Index AI

id INT PRIMARY YES(Check)

username VARCHAR 35

password VARCHAR 35

This is the sample DATABASE and TABLE we have crated

Lets add data’s by clicking insert

1. Fill data needed (username & password)2. Click Go

Note: We leave “id” since its on AI(auto increment)

Click on browse to check if data encoded has been save.

now create a PHP file to connect with the database which was created in MySQL

Open Notepad++

Create a PHP file save as chngpaswd.php

Note: Save to folder xampp\htdocs\section

Test files:● Open the browser and type the URL

localhost/section/chngpaswd.php

New Password does not match!

Old Password does not match!

Password has been Changed

Check MySQL about the data that has been changed.