Live connection to a MySQL database — add, view, and delete student records in real time.
| ID | Name | Course | Year | Added | Action | |
|---|---|---|---|---|---|---|
| 5 | Mary Junnette Urtua | BS Information Technology | Year 3 | maryjunnette@email.com | May 27, 2026 | |
| 6 | Juan dela Cruz | BS Computer Science | Year 2 | juandlc@email.com | May 27, 2026 | |
| 7 | Ana Reyes | BS Information Systems | Year 1 | anareyes@email.com | May 27, 2026 |
This page connects to a MySQL database using PHP's mysqli extension. The SQL table structure:
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
course VARCHAR(100) NOT NULL,
year_level INT NOT NULL DEFAULT 1,
email VARCHAR(150) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);