<?php
include"../../../../inc/conn.php";

// CEK HAK AKSES DISINI


$id_unit		= str_replace("'","`",(isset($_POST['id_unit'])) ? $_POST['id_unit'] : "");
$soal			= str_replace("'","`",(isset($_POST['soal'])) ? $_POST['soal'] : "");

$simpan = mysqli_query($connect,"insert into tb_essai set 

		id_unit			= '".$id_unit."',
		soal			= '".$soal."'

")or die(mysqli_error($connect));


if($simpan){
	echo"<script>alert('Soal uji konsep berhasil disimpan !');</script>";
	echo"<script>document.location.href='index.php?prefix=ujikonsep&unit=$id_unit'</script>";
}else{
	echo"<script>alert('Gagal mengeksekusi perintah ini !');history.go(-1)</script>";
}
?>