1) Creating our Database
First, we're going to create a database.
Open phpMyAdmin.
Click databases, create a database, and name it as "EMP".
After creating a database, click the SQL and paste the below code.
CREATE TABLE `details` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`firstname` VARCHAR(30) NOT NULL,
`lastname` VARCHAR(30) NOT NULL,
`address` VARCHAR(100) NOT NULL,
`class` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
2) Creating our Connection
The next step is to create a database connection and save it as "conn.php".
3) Creating our Table and Add Form
Then, we will create our table and "add form" and name it as "index.php".
4) Creating our Add Script
This script will add the data inputted by the user to our database upon submission and we name it as "add.php".
5) Creating our Edit Form
This form will enable the user to edit the selected row. We name this form as "edit.php".
6) Creating our Edit Script
This script will update our database depending on user input and upon submission. We name this form as "update.php".
7) Creating our Delete Script
Lastly, we create our delete script and name it as "delete.php".
****************************************************************************
Click to visit the homepage of our channel : / rabiulislamofficial
****************************************************************************
Follow me on facebook:-
/ rabiul.islam.bca.mca
****************************************************************************