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

$id_po= $_REQUEST['id_po'];


echo $id_po;




    $strSQL = "SELECT * FROM pd_po where id_po='$id_po'";
    $objQuery = mysqli_query($con,$strSQL);  
    $objResult = mysqli_fetch_array($objQuery);
    $ido_po=$objResult[id_po];
    echo $id_po;
    
    
    $strSQL1 = "SELECT * FROM `pd_posub` id_po='$objResult[id_po]'";
    $objQuery1 = mysqli_query($con,$strSQL1);  
    $objResult1 = mysqli_fetch_array($objQuery1);
    $pd_posub=$objResult1['pd_posub'];
    
     echo $pd_posub;
    
    
    
    
    exit;
    


    $sql = "DELETE FROM qc_checklistitem WHERE Cli_id = '$Cli_id'";
	$query = mysqli_query($con,$sql);

	
    $sql_sub = "DELETE FROM qc_resultinout WHERE Item_id = '$Item_id'and Cli_code = '$Cli_code'";
	$querysub = mysqli_query($con,$sql_sub);
	
	
	
        if($query){
            ?>
                <script language="JavaScript" type="text/javascript">
                    <!--
                    alert("ลบข้อมูลเรียบร้อย!!");
                    location.href='../admin/data_inouttest.php';
                    //-->
                </script>
            <?php
        }else{
            
            echo "Error: " . $sql . "<br>" . mysqli_error($con);

        }
        mysqli_close($con);

?>