<?php
ob_start();
session_start();
include("inc/config.php");

if(isset($_POST["awb_number"])) {
    
     $awb_number = $_POST["awb_number"];
     
                            $statement = $pdo->prepare("SELECT * FROM `pickup_entry` WHERE pickup_entry.ref_no='$awb_number'");
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
							$count=$statement->rowCount();
						if($count>0)
							{
							   $status="AWB Number Already Exists...";
							   $v=0;
							   $datas[] = array('status'=>$status,'v'=>$v);
                                
							}
							else
							{
							     $status="";
							     $v=1;
							     $datas[] = array('status'=>$status,'v'=>$v);
							}
							echo json_encode($datas);
							 
}

?>
