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

$id_ktp = $_POST['id_ktp'];
$keterangan = $_POST['keterangan'];
$tanggal = $_POST['tanggal'];
$id_penduduk = $_POST['id_penduduk'];
$kelurahan = "6";



$sql = "INSERT INTO ktp(id_ktp,id_penduduk,keterangan,id_kelurahan,tanggal)VALUES('$id_ktp','$id_penduduk','$keterangan','$kelurahan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Permohonan Pengantar KTP 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>";
}
