<?php
// db.php
// === BURAYI DOLDUR ===
$DB_HOST = "localhost";
$DB_NAME = "denese";
$DB_USER = "root";
$DB_PASS = "12345678";

try {
  $pdo = new PDO(
    "mysql:host=$DB_HOST;dbname=$DB_NAME;charset=utf8mb4",
    $DB_USER,
    $DB_PASS,
    [
      PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
      PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
    ]
  );
} catch (Exception $e) {
  http_response_code(500);
  echo "DB bağlantı hatası: " . htmlspecialchars($e->getMessage());
  exit;
}
