<?php
declare(strict_types=1);

/**
 * db.php
 * Update the DB_* values below to match your MySQL credentials.
 */

$DB_HOST = '127.0.0.1';
$DB_NAME = 'tstcrmeduclaas_filetracker';
$DB_USER = 'tstcrmeduclaas_filetracker';
$DB_PASS = '#ohUruPsS54U3v6E';

$dsn = "mysql:host={$DB_HOST};dbname={$DB_NAME};charset=utf8mb4";
$options = [
  PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
  PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
  PDO::ATTR_EMULATE_PREPARES   => false,
];

try {
  $pdo = new PDO($dsn, $DB_USER, $DB_PASS, $options);
} catch (Throwable $e) {
  http_response_code(500);
  exit("DB connection failed.");
}
