<?php
header("Content-Type: application/json");$host = 'localhost';      // Or your database host
$dbname = 'bandevac_crm'; // Replace with your database name
$user = 'bandevac_crm';    // Replace with your database username
$pass = 'bandevac_crm';    // Replace with your database password

try {
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $user, $pass);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    echo json_encode(['status' => 'error', 'message' => 'Database connection failed: ' . $e->getMessage()]);
    exit();
}
?>