<?php
ob_start();
session_start();
require_once("../conn/conn.php");
//include('../utility/chksession.php');
date_default_timezone_set("Asia/Bangkok");
$id_posub=$_POST['id_posub'];
$job_id=$_POST['job_id'];
$mac_id=$_POST['mac_id'];
$job_date=$_POST['job_date'];
$job_enddate=$_POST['job_enddate'];
$job_qty=$_POST['job_qty'];
$job_respon=$_POST['job_respon'];

            $sqljob = "UPDATE pd_jobsub SET mac_id='$mac_id',job_date = '$job_date',job_enddate = '$job_enddate',job_qty = '$job_qty',job_respon = '$job_respon' WHERE job_id = '$job_id'";
	        $queryjob = mysqli_query($con,$sqljob);
                if($queryjob){
                    ?>
                    <script language="JavaScript" type="text/javascript">
                        <!--
                        alert("บันทึกข้อมูลเรียบร้อย");
                        location.href='../user/user_jobsub2.php?id_posub=<?=$id_posub;?>';
                        //-->
                    </script>
                    <?php
                }else{
                    
                    echo "Error: " . $sqljob . "<br>" . mysqli_error($con);
        
                }
        mysqli_close($con);
            
            










?>