<?php
// _serveur.php — Database connection, JSON-safe
header('Content-Type: application/json; charset=utf-8');

// Database credentials
$host = "localhost";
$user = "stjoseph_john";
$password = "John521889!";
$database = "stjoseph_miniara";

// Connect to MySQL
$link = mysqli_connect($host, $user, $password, $database);

// Check connection
if (!$link) {
    echo json_encode([
        'success' => false,
        'error' => 'Database connection failed: ' . mysqli_connect_error()
    ]);
    exit;
}

// Set UTF-8 charset
mysqli_set_charset($link, "utf8");

