<?php
include("sess_check.php");

$id_domisili = $_POST['id_domisili'];
$id_penduduk = $_POST['id_penduduk'];
$id_kelurahan = $_POST['id_kelurahan'];
$tanggal = $_POST['tanggal'];

$sql = "INSERT INTO domisili(id_domisili,id_penduduk, id_kelurahan, tanggal)VALUES('$id_domisili','$id_penduduk','$id_kelurahan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Tambah Surat Domisili Berhasil!');</script>";
	echo "<script type='text/javascript'> document.location = 'skdomisili.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 = 'skdomisili_tambah.php'; </script>";
}
