<?php
include '../inc/db.php';
if ($conn->connect_error) die("DB failed");

$id    = $_POST['id'];
$token = $_POST['token'];

$stmt = $conn->prepare("DELETE FROM stone_calculations WHERE id = ? AND user_token = ?");
$stmt->bind_param("is", $id, $token);
$stmt->execute();

$stmt->close();
$conn->close();

echo "deleted";
?>
