10 lines
375 B
PHP
10 lines
375 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
$conn = new mysqli('localhost', 'root', '', 'webgis');
|
|
$data = json_decode(file_get_contents('php://input'), true);
|
|
$stmt = $conn->prepare("DELETE FROM rumah_ibadah WHERE id = ?");
|
|
$stmt->bind_param("i", $data['id']);
|
|
echo $stmt->execute()
|
|
? json_encode(['status' => 'success'])
|
|
: json_encode(['status' => 'error']);
|
|
?>
|