<?php
include("dist/config/koneksi.php");

$id_kk = $_POST['id_kk'];
$keperluan = $_POST['keperluan'];
$keterangan_lain = $_POST['keterangan_lain'];
$tanggal = $_POST['tanggal'];
$id_penduduk = $_POST['id_penduduk'];
$kelurahan = "6";



$sql = "INSERT INTO kartu_keluarga(id_kk,id_penduduk,keperluan,keterangan_lain,id_kelurahan,tanggal)VALUES('$id_kk','$id_penduduk','$keperluan','$keterangan_lain','$kelurahan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Permohonan Kartu Keluarga Berhasil di simpan!');</script>";
	echo "<script type='text/javascript'> document.location = 'home.php'; </script>";
} else {
	echo ("Error description: " . mysqli_error($conn));
	echo "<script>alert('Ops, terjadi kesalahan. Silahkan coba lagi.');</script>";
	echo "<script type='text/javascript'> document.location = 'home.php'; </script>";
}
