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

// CEK HAK AKSES DISINI

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

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


$update = mysqli_query($connect,"update tb_essai set 

		kunci			= '".$kunci."'
		
	where id_essai='$id_essai'")or die(mysqli_error($connect));


if($update){
	echo"<script>alert('Soal uji konsep berhasil diperbarui !');</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>";
}
?>