<?php

require_once "config.php";
$id=$_POST['id'];
$sql="select * from vendor_invoice_details where id='".$id."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}
$data=array();
while($result=mysqli_fetch_array($query)){
  array_push($data,$result);    
}
echo json_encode(array(
    "data"=>$data
));
?>