<?php
session_start();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
include"../../../../inc/conn.php";

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


$delete1 	= mysqli_query($connect,"delete from tb_essai where id_essai='$id_essai'")or die(mysqli_error($connect));
$delete2 	= mysqli_query($connect,"delete from tb_jawaban where id_essai='$id_essai'")or die(mysqli_error($connect));


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


?>