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

date_default_timezone_set("Asia/Bangkok");


$dep_id=$_POST['dep_id'];
$dep_name=$_POST['dep_name'];



//exit;



		 $sql = "UPDATE hr_dep SET dep_name = '$dep_name',dep_name='$dep_name' 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);
	
		

  
?>