<?php
include('../config.php');
$truck_no = $_POST['truck_no'];
$sql1 = "SELECT * FROM truck_mst WHERE truck_no like '%". $truck_no ."%'";
$res1 = mysqli_query($conn,$sql1);
$num_rows1 = mysqli_num_rows($res1);
if (!empty($num_rows1)) {
	$result1 = mysqli_fetch_assoc($res1);
	$Qry = "SELECT * FROM truck_mst WHERE truck_no = '$truck_no'";
	$res = mysqli_query($conn,$Qry);
	if(mysqli_num_rows($res) > 0){
		$row = mysqli_fetch_assoc($res);
		$rec_qty = $row['lorry_type'];
	}
	$result1['lorry_type'] = ($rec_qty);
	echo json_encode($result1);
    die();
}else{
	echo json_encode(array());
    die();
}



?>

