<?php
session_start();

define('APP_NAME', 'SHAHANA VEGETABLES');
define('STORE_ADDRESS', 'near police station, courtroad, alathur, palakkad - 678541');
define('STORE_PHONE', '+918089535189');
define('STORE_EMAIL', 'shahanastoresalathur@gmail.com');
define('PASSWORD_EXPIRY_DAYS', 90);

define('DB_HOST', 'localhost');
define('DB_NAME', 'shahana_veg');
define('DB_USER', 'change_db_user');
define('DB_PASS', 'change_db_pass');

function db() {
    static $pdo = null;
    if ($pdo === null) {
        $dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4';
        $pdo = new PDO($dsn, DB_USER, DB_PASS, [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        ]);
    }
    return $pdo;
}
?>
