<?php 
include('../include/config.php');
if(!empty($_POST["id"])) 
{
    $cnt= $_POST["id"];
    $result =mysqli_query($con,"SELECT farminput.*,Staffs.Name as staname from farminput left join Staffs ON Staffs.id=farminput.User WHERE farminput.id='$cnt'");
    $row=mysqli_fetch_array($result);
    echo json_encode($row);
    }else
    {
      echo "Not found";
    }

?>