<?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_video		= str_replace("'","`",(isset($_POST['id_video'])) ? $_POST['id_video'] : "");


$delete1 	= mysqli_query($connect,"delete from tb_video where id_video='$id_video'")or die(mysqli_error($connect));


if($delete1){
	echo"<script>alert('Video pembelajaran berhasil dihapus !');</script>";
	echo"<script>document.location.href='index.php?prefix=video&unit=$id_unit'</script>";
}else{
	echo"<script>alert('Gagal mengeksekusi perintah ini !');history.go(-1)</script>";
}


?>