Files
2026-06-13 10:54:54 +07:00

13 lines
249 B
PHP

<?php
include 'db.php';
$data = json_decode(file_get_contents("php://input"));
$coords = json_encode($data->coordinates);
$sql = "INSERT INTO polygons (coordinates) VALUES ('$coords')";
$conn->query($sql);
echo json_encode(["status"=>"ok"]);
?>