<?php
include 'koneksi.php';
$id = $_POST['id'];
$nama = $_POST['nama_masjid'];
$pic = $_POST['pic_masjid'];
$alamat = $_POST['alamat'];
$sql = "UPDATE masjid SET nama_masjid='$nama', pic_masjid='$pic', alamat='$alamat' WHERE id='$id'";
echo mysqli_query($conn, $sql) ? "Sukses" : "Gagal: " . mysqli_error($conn);
?>