<?php
ob_start();
session_start();
require_once("../conn/conn.php");
//include('../utility/chksession.php');

$dep_id= $_REQUEST['dep_id'];


    $sql = "DELETE FROM hr_dep WHERE dep_id = '$dep_id'";
	$query = mysqli_query($con,$sql);

        if($query){
            ?>
                <script language="JavaScript" type="text/javascript">
                    <!--
                    alert("ลบข้อมูลเรียบร้อย!!");
                    location.href='../admin/data_dep.php';
                    //-->
                </script>
            <?php
        }else{
            
            echo "Error: " . $sql . "<br>" . mysqli_error($con);

        }
        mysqli_close($con);

?>