<?php
$db_host = 'localhost';
$db_name = 'transubd_PointageBus';
$db_user = 'transubd_transub_user';
$db_pass = 'Tr@nsub2@24';

$conn = new PDO("mysql:host=$db_host;dbname=$db_name", $db_user, $db_pass);
$stmt = $conn->query("SELECT id, matricule FROM buses LIMIT 3");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);

header('Content-Type: application/json');
echo json_encode($rows);
