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

// CEK HAK AKSES DISINI


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

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

		nama_kelas	 		= '".$nama_kelas."'")or die(mysqli_error($connect));


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