<?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  `swimid`, `age_group`, `cost` FROM `swimming`";
$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);
?>
