<?php
include("dist/config/koneksi.php");
include("home_top.php");
$tanggal = date('Y-m-d');
?>

<div class="container mt-5">
  <h1 class="text-center mb-4">Form Permohonan Keterangan Belum Nikah</h1>

  <form class="form-horizontal" action="keteranganbelumnikah_insert.php" method="POST" enctype="multipart/form-data">
  <div class="mb-3">
      <label for="nama" class="form-label">Id Penduduk</label>
      <input type="number" class="form-control" id="id_penduduk" name="id_penduduk" placeholder="Masukkan Id Penduduk">
    </div>
    
    <div class="mb-3">
      <label for="alamat" class="form-label">Keterangan</label>
      <textarea class="form-control" id="keterangan" name="keterangan" rows="3" placeholder="Masukkan Keterangan Permohonan"></textarea>
    </div>
    <div class="mb-3">
      <label for="status" class="form-label">Status</label>
      <select name="id_status" id="status" class="form-control" required>
										<option value="">==== Pilih Status ====</option>
										<?php
										$sql_brg = "SELECT * from status order by id_status asc";
										$ress_brg = mysqli_query($conn, $sql_brg);
										while ($li = mysqli_fetch_array($ress_brg)) {
											echo '<option value="' . $li['id_status'] . '">'  . $li['status'] . '</option>';
										}
										?>
									</select>
    </div>
    <div class="mb-3">
    <label for="alamat" class="form-label">Tanggal Permohonan</label>
    <input type="text" name="tanggal" class="form-control" placeholder="Nama Lengkap" value="<?php echo $tanggal; ?>" required>
    </div>
    <button type="submit" class="btn btn-primary" name="simpan">Simpan</button>
  </form>
</div>

<?php
include("home_bottom.php");
?>