<?php
$host = "localhost";
$dbname = "rs_lab";
$username = "root";
$password = "";
$port = 3306; // change to 3307 ONLY if MySQL runs on 3307

try {
    $pdo = new PDO(
        "mysql:host=$host;port=$port;dbname=$dbname;charset=utf8mb4",
        $username,
        $password
    );
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    die("Database connection failed");
}
