<?php
require_once __DIR__ . '/config/config.php';

// Fetch active users
$query = $conn->query("SELECT id, full_name, email FROM users WHERE account_status = 'active' ORDER BY full_name ASC");

$users = [];

while ($row = $query->fetch_assoc()) {
    $users[] = $row;
}

echo json_encode($users);
?>
