Files
WebGIS_Project/01/hapus_data.php
T
luthfihadinugroho79 e950468760 add files
2026-06-10 19:42:59 +07:00

13 lines
285 B
PHP

<?php
include 'koneksi.php';
$id = mysqli_real_escape_string($koneksi, $_POST['id']);
$query = "DELETE FROM $nama_tabel WHERE id='$id'";
if(mysqli_query($koneksi, $query)) {
echo "Data berhasil dihapus!";
} else {
echo "Gagal menghapus data: " . mysqli_error($koneksi);
}
?>