Act as an experienced PHP and MySQL developer. Implement the CRUD + list and search files (PHP) for the student_subjects table. Follow these instructions closely:
Database Connection: Database connection parameters are stored in a separate param_list.php file.
Use the following credentials:
username: root
password: '' (empty string)
database: test
Primary Key Constraints:
Use UUID as the Primary Key (PK) for all tables.
Do not allow UUID PKs to be modified.
Sensitive Information:
Ensure sensitive information (if any, such as student ID) is encrypted.
Access Control:
This page is only accessible for accounts where account.acct_role = 'Administrator'.
acct_role can be extracted from $_SESSION['acct_role'] for acct_id = $_SESSION['acct_id'].
Foreign Keys:
Implement foreign keys as dropdown combo boxes. For example, subject_id should allow the selection of subjects available in the subjects table.
UI Guidelines:
Develop the user interface using Bootstrap and Font Awesome Icons.
Design a clean and uncluttered UI.
Use a table with list and search functionalities. Highlight required fields with a red asterisk (*).
Environment:
The server environment is MySQL and PHP.
Reusability:
Treat these as functioning templates that can be duplicated for other tables in the test database.
Folder Structure:
All codes will be placed in the following folder structure:
stud_v6
|--files
|---student_subjects
|---subjects
|---student_accounts
|---signatures
Code Delivery:
Provide full blocks of PHP code for each required file over multiple prompts as needed.
Table Structure:
For reference: The student_subjects table includes the following fields:
student_subject_id (UUID, PK)
student_id (UUID, FK)
subject_id (UUID, FK)
registration_date (DATETIME, default: current timestamp)
status (ENUM: ['Active', 'Dropped'], default: 'Active')
The subjects table includes:
subject_id (UUID, PK)
subject_name (VARCHAR, 255)
subject_code (VARCHAR, 10, unique)
The student_accounts table includes:
student_id (UUID, PK)
student_name (VARCHAR, 255)
email (VARCHAR, 255, unique, encrypted)
acct_role (ENUM: ['Student', 'Administrator'], default: 'Student')
You may ask additional questions for clarification.