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


$id_item=$_POST['id_item'];
$name_item=$_POST['name_item'];
$item_wh=$_POST['item_wh'];



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

        }
        mysqli_close($con);




?>