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

?>