<?php
include "config.php";

$result = $conn->query("SELECT * FROM deposits");

if (!$result) {
    exit(json_encode([
        "status" => false,
        "message" => "Query failed"
    ]));
}

$data = [];

while ($row = $result->fetch_assoc()) {
    $data[] = $row;
}

echo json_encode([
    "status" => true,
    "data" => $data
]);

$conn->close();
?>