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

$id_blmnikah = $_POST['id_blmnikah'];
$id_penduduk = $_POST['id_penduduk'];
$kelurahan = "6";
$id_status = $_POST['id_status'];
$keterangan = $_POST['keterangan'];
$tanggal = date('Y-m-d');

$sql = "INSERT INTO belumnikah(id_blmnikah,id_penduduk,id_kelurahan,id_status,keterangan,tanggal)VALUES('$id_blmnikah','$id_penduduk','$kelurahan','$id_status','$keterangan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Permohonan Belum Nikah 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>";
}
