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

$id_kehilangan = $_POST['id_kehilangan'];
$id_penduduk = $_POST['id_penduduk'];
$kelurahan = "6";
$keterangan_kehilangan = $_POST['keterangan_kehilangan'];
$tanggal = date('Y-m-d');

$sql = "INSERT INTO kehilangan(id_kehilangan,id_penduduk,id_kelurahan,keterangan_kehilangan,tanggal)VALUES('$id_kehilangan','$id_penduduk','$kelurahan','$keterangan_kehilangan','$tanggal')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Permohonan Kehilangan 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>";
}
