<?php
// Assuming you have a database connection script (e.g., shikanisha.kts.php)
require('shikanisha.kts.php');

// Fetch data from the database (replace with your actual SQL query)
$sql = "SELECT  `swimo_id`, `age_group`, `cost`, `no_persons`, `total_cost`, `date_column` FROM `swimo`";
$result = $conn->query($sql);

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

// Close the database connection
$conn->close();

// Send JSON response back to DataTable
header('Content-Type: application/json');
echo json_encode($data);
?>
