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

// Check if session_id is provided
if (isset($_POST['session_id'])) {
    $sessionId = $_POST['session_id'];

    // Perform the delete operation (replace with your actual SQL query)
    $sql = "DELETE FROM swimo WHERE swimo_id = $sessionId";
    $result = $conn->query($sql);

    if ($result) {
        echo json_encode(array("success" => true));
    } else {
        echo json_encode(array("success" => false, "message" => "Error deleting session"));
    }
} else {
    echo json_encode(array("success" => false, "message" => "Session ID not provided"));
}
header('Content-Type: application/json');
// Close the database connection
$conn->close();
?>
