<?php
include 'koneksi.php';
$nama = $_POST['nama_kepala']; $jml = $_POST['jumlah_kk']; $alamat = $_POST['alamat']; $lat = $_POST['lat']; $lng = $_POST['lng'];
$sql = "INSERT INTO kemiskinan (nama_kepala, jumlah_kk, alamat, lat, lng) VALUES ('$nama', '$jml', '$alamat', '$lat', '$lng')";
if ($conn->query($sql) === TRUE) { echo "Sukses"; } else { echo "Error: " . $conn->error; }
$conn->close();
?>