1e versie

This commit is contained in:
2025-11-12 10:17:30 +01:00
commit 6b5f9abec7
10 changed files with 255 additions and 0 deletions

14
includes/db.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
$config = require __DIR__ . '/../config/config.php';
try {
$pdo = new PDO(
"mysql:host={$config['db']['host']};dbname={$config['db']['name']};charset=utf8mb4",
$config['db']['user'],
$config['db']['pass'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
} catch (PDOException $e) {
die("Databaseverbinding mislukt: " . $e->getMessage());
}