<?php
 
include 'database.php';
	$id = mysqli_real_escape_string($koneksi, $_POST["id"]);
	$email = mysqli_real_escape_string($koneksi, $_POST["email"]);
	$erincian = mysqli_real_escape_string($koneksi, $_POST["erincian"]);
	$periode = mysqli_real_escape_string($koneksi, $_POST["checkin"]);
	$thn_informasi = mysqli_real_escape_string($koneksi, $_POST["thn_informasi"]);
	$emendapatkan = mysqli_real_escape_string($koneksi, $_POST["emendapatkan"]);
	$ememperoleh = mysqli_real_escape_string($koneksi, $_POST["ememperoleh"]);
    $query = "
	INSERT INTO tb_informasi(id, email, rincian, periode, cara_mendapatkan, cara_memperoleh, status_informasi, tahun)  
	VALUES('$id', '$email', '$erincian', '$periode', '$emendapatkan', '$ememperoleh', '11', '$thn_informasi')
   ";
	mysqli_query($koneksi, $query);

	$query2 = "
    update datatamu set status = '1' where id = '$_POST[id]'";
	if (mysqli_query($conn, $query2))
	{
		echo '<script> alert ("Data Berhasil Disimpan")</script>';
	}
	?>
	