Lab 02
Database Connection & Users

PDO Connection — Querying the Database

Demonstrates connecting to the vehicle_log database using PDO and retrieving data from the users table. This establishes the foundational data access pattern for the entire application.

Registered System Users

4 records found
ID First Name Last Name Email Address System Role
1 Admin Admin admin@test.com Admin
2 CPT83 User cpt283@test.com User
3 John Doe john.doe@test.com User
4 Jane Smith jane.smith@test.com User

Database Implementation Detail

PDO (PHP Data Objects)

Using the PDO driver ensures cross-database compatibility and provides localized protection against SQL injection through the use of prepared statements and parameter binding.

User Management

The users table serves as the primary authentication authority, storing hashed passwords and facilitating role-based access control (RBAC) across administrative and standard user interfaces.