<?php
// conn.php
$host = 'localhost';
$dbname = 'u296133816_mdataplus';
$user = 'u296133816_mdataplus';
$password = 'O1v&aSO|';

try {
    $con = new mysqli($host, $user, $password, $dbname);
    
    if ($con->connect_error) {
        throw new Exception("Connection failed: " . $con->connect_error);
    }
} catch (Exception $e) {
    die(json_encode(['error' => $e->getMessage()]));
}
?>