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



$id_po=$_POST['id_po'];
$po_status=$_POST['po_status'];
$po_checker=$_POST['po_checker'];
$po_comment=$_POST['po_comment'];
//$po_dateconfirm=$_POST['po_dateconfirm'];


  
   $sql = "UPDATE pd_po SET po_status='$po_status', po_checker = '$po_checker',po_comment = '$po_comment',po_dateconfirm= NOW()
   WHERE id_po = '$id_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);





?>