<?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'] : "");

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


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

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


if($update){
	echo"<script>alert('Pembahasan soal 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>";
}
?>