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

// CEK HAK AKSES DISINI

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


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

		nama_kelas 			= '".$nama_kelas."'

	where id_kelas='$id_kelas'")or die(mysqli_error($connect));


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