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

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



$sql = "INSERT INTO skck(id_skck,id_penduduk,keperluan,keterangan_lain,id_kelurahan,tanggal)VALUES('$id_skck','$id_penduduk','$keperluan','$keterangan_lain','$kelurahan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Permohonan SKCK 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>";
}
