<?php
/**
 * Karayel Menu System - Database Configuration
 * Auto-generated on 2025-12-10 20:04:34
 */

define('DB_HOST', 'localhost');
define('DB_NAME', 'osman_test');
define('DB_USER', 'osman_test');
define('DB_PASS', 'alfa1792231.');
define('DB_CHARSET', 'utf8mb4');

// Timezone
date_default_timezone_set('Europe/Istanbul');

// Session configuration
ini_set('session.cookie_httponly', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_secure', 0); // Set to 1 if using HTTPS

// Database connection
try {
    $pdo = new PDO(
        'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET,
        DB_USER,
        DB_PASS,
        [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_EMULATE_PREPARES => false
        ]
    );
} catch (PDOException $e) {
    die('Database connection failed: ' . $e->getMessage());
}
