<?php 
// DB credentials
define('DB_HOST','localhost');
define('DB_USER','softwarebluebase_library');
define('DB_PASS','Girish@2708');
define('DB_NAME','softwarebluebase_library');

try {
    // Use utf8mb4 instead of utf8
  $dbh = new PDO(
    "mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8mb4",
    DB_USER,
    DB_PASS,
    array(
        PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4",
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
    )
);

} catch (PDOException $e) {
    exit("Error: " . $e->getMessage());
}
?>
