'Missing marker id']); exit; } $db = getDB(); $stmt = $db->prepare('DELETE FROM markers WHERE id = ?'); $stmt->execute([$data['id']]); echo json_encode(['success' => true]); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => $e->getMessage()]); } } else { http_response_code(405); echo json_encode(['error' => 'Method not allowed']); } ?>