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

