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

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

$filefoto = md5($id_siswa);
unlink ("../../../../assets/foto/$filefoto.jpg");

$delete1 	= mysqli_query($connect,"delete from tb_siswa where id_siswa='$id_siswa'")or die(mysqli_error($connect));
$delete3 	= mysqli_query($connect,"delete from tb_jawaban where id_siswa='$id_siswa'")or die(mysqli_error($connect));



if($delete1){
	echo"<script>alert('Data berhasil dihapus !');history.go(-1)</script>";
}else{
	echo"<script>alert('Gagal mengeksekusi perintah ini !');history.go(-1)</script>";
}
?>