Live connection to a MySQL database — add, view, and delete student records in real time.
| ID | Name | Course | Year | Added | Action | |
|---|---|---|---|---|---|---|
| 1 | Daisy Joy Oval | BS Information Technology | Year 3 | daisyjoy@email.com | May 26, 2026 | |
| 2 | Juan dela Cruz | BS Computer Science | Year 2 | juandlc@email.com | May 26, 2026 | |
| 3 | Ana Reyes | BS Information Systems | Year 1 | anareyes@email.com | May 26, 2026 |
This page connects to MySQL using PHP's mysqli extension. The 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
);