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


$u_Id=$_POST['u_Id'];
$u_Username=$_POST['u_Username'];
$u_Name=$_POST['u_Name'];
$u_Password=$_POST['u_Password'];
$u_Level=$_POST['u_Level'];

 
 echo $u_Username.$u_Name.$u_Password.$u_Level;
//exit;




    
    $sql = "UPDATE qc_user SET u_Username = '$u_Username',u_Name = '$u_Name',u_Password = '$u_Password',u_Level = '$u_Level' WHERE u_Id = '$u_Id'";
	$query = mysqli_query($con,$sql);
        if($query){
            ?>
                <script language="JavaScript" type="text/javascript">
                    <!--
                    alert("บันทึกข้อมูลเรียบร้อย");
                    location.href='../admin/data_user.php';
                    //-->
                </script>
            <?php
        }else{
            
            echo "Error: " . $sql . "<br>" . mysqli_error($con);

        }
        mysqli_close($con);




?>