Рет қаралды 108
What You’ll Learn in Chapter 11:
Delete Student Functionality:
How to delete student records from the database when an admin selects the "Delete" option.
Edit Student Functionality:
How to allow admins to modify student information through an editable form.
1. Delete Student Functionality
Deleting a Student Record
We will add a "Delete" button next to each student entry in the student list. When clicked, the corresponding student record will be deleted from the database.
Delete Student Code
The delete_student.php file will be responsible for deleting the student record from the database.
Steps:
The admin clicks the "Delete" button associated with a student.
The id of the student is passed through the URL.
The delete_student.php script retrieves the id and deletes the corresponding student record.