<?php
// Database connection variables
$host = 'localhost'; // Hostname
$dbname = 'oscotech_cbt'; // Database name
$username = 'oscotech_oscopt'; // Database username
$password = 'oscopt'; // Database password

try {
    // Create a new PDO instance
    $pdo = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
    
    // Set the PDO error mode to exception
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    //echo "Connected successfully"; 
} catch (PDOException $e) {
    // Handle connection error
    echo "Connection failed: " . $e->getMessage();
}
?>
