<?php
// includes/config.php

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

// ===== Database config =====
$DB_HOST = '127.0.0.1';
$DB_USER = 'root';
$DB_PASS = '';
$DB_NAME = 'online_book_shop';

// Create mysqli connection
$conn = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME);

if ($conn->connect_error) {
    die('Database connection failed: ' . $conn->connect_error);
}

// Use UTF-8
$conn->set_charset('utf8mb4');

