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

$no_po=$_POST['no_po'];
$id_name=$_POST['id_name'];
$order_date=$_POST['order_date'];
$comfirm_date=$_POST['comfirm_date'];
$complete_date=$_POST['complete_date'];
$delivery_date=$_POST['delivery_date'];
$remark=$_POST['remark'];
$qty=$_POST['qty'];
$unit=$_POST['unit'];

  
   $sql = "UPDATE pd_po SET id_name = '$id_name',order_date = '$order_date',comfirm_date='$comfirm_date',complete_date='$complete_date',
   delivery_date = '$delivery_date',remark = '$remark',qty = '$qty',
   unit = '$unit',unit = '$unit'
   WHERE no_po = '$no_po'";
	$query = mysqli_query($con,$sql);
        if($query){
            ?>
                <script language="JavaScript" type="text/javascript">
                    <!--
                    alert("บันทึกข้อมูลเรียบร้อย");
                    location.href='../admin/data_po.php';
                    //-->
                </script>
            <?php
        }else{
            
            echo "Error: " . $sql . "<br>" . mysqli_error($con);

        }
        mysqli_close($con);





?>