skye8-tech / openFolio-v1-functional

0 stars 11 forks source link

Create a Secure and Centralized Database Connection File Using PDO Description: #7

Open andrew21-mch opened 3 months ago

andrew21-mch commented 3 months ago

Develop a centralized database connection file using mysqli to handle all database interactions securely across the project. This file will ensure consistent and secure connections to the database, with support for error handling and prepared statements.

Steps to Complete:

Create a db.php file that establishes a secure connection to the MySQL database using mysqli Configure the connection to handle errors appropriately (e.g., using exceptions). Use prepared statements for all database queries to prevent SQL injection. Acceptance Criteria:

A secure, reusable database connection is established using mysqli. All database interactions in the project use the centralized connection file.