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

// CEK HAK AKSES DISINI


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


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

		judul_unit	 		= '".$judul_unit."',
		aktif				= '".$aktif."'")or die(mysqli_error($connect));


if($simpan){
	echo"<script>alert('Data unit berhasil disimpan !');</script>";
	echo"<script>document.location.href='datamodul'</script>";
}else{
	echo"<script>alert('Gagal mengeksekusi perintah ini !');history.go(-1)</script>";
}
?>