Solutions
The objective in this problem is to create a web application with HTML, PHP &
MySQL that allows the user for managing the details by performing the CRUD
(Create, Read, Update & delete) operations.
Explanation is as below:-
The deliverables in the code are:
1. student_form.html → The student form
2. process_form.php → It handles form and the database logic
3. finaloutput.doc → It contains the screenshots of:
o Form submission
o Database tables
o Query result
1.Creating the Form for Student Details
Here, we are required to create a form where a student will be able to enter their
details
student_form.html
2.Server side form processing with PHP
The goal is to receive the form data & then store it inside the database.
The code :
1. Connects to MySQL
2. Creates a database & tables if not exist
3. Inserts the record of the student
4. Adds mapping of the department
process_form.php
3. The MySQL database and the Table Creation
The process has already been included in the process_form.php file with the
CREATE TABLE IF NOT EXISTS sql commands
CRUD operations
Create → Insert data (done above)
Read → View data
Update → Modify data
Delete → Remove data
Reading or Viewing all students with department
SQL queries
Fetching the students with the separtment information
Fetching all the students
Displaying the department names & the count of the students