Mini Shell

Direktori : /var/www/vhosts/ccp.ac.th/smtp.ccp.ac.th/httpdocs/sp/admin/
Upload File :
Current File : /var/www/vhosts/ccp.ac.th/smtp.ccp.ac.th/httpdocs/sp/admin/del_subject.php

<?php
include '../db/database.php';
$id = $_GET['id'];
$sql = "DELETE FROM tbl_sub_type WHERE 	sub_type_id='$id'";
$result = mysqli_query($link, $sql);

if ($result) {
    header("Location: subject.php");
}else {
 echo "<script language='javascript'>
 alert('ไม่สามารถลบข้อมูลได้เนื้องจากข้อมูลนี้ถูกใช้งานอยู่'); location.href='subject.php';
 </script>";
}

Zerion Mini Shell 1.0