<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
$kode = $_POST['id'];
$query = "SELECT * FROM tugas WHERE id_tugas='".$kode."'";
		$sql = mysqli_query($koneksi, $query); 
		$data = mysqli_fetch_array($sql);

		if(is_file("../../datafile/".$data['file'])) 
			unlink("../../datafile/".$data['file']); 
$exec = mysqli_query($koneksi, "DELETE FROM tugas WHERE id_tugas='$kode'");
$exec = mysqli_query($koneksi, "DELETE FROM jawaban_tugas WHERE id_tugas='$kode'");
