<?php 
	 include_once('../../../config/conn/db-connection.php');
	 if(isset($_POST['sapform_id'])){ 	
	    $id = trim($_POST['sapform_id']);
		$stmt = $db->query("SELECT *, CONCAT(lastname, ', ', firstname, ' ', middlename) as full_name FROM tbl_sapform a INNER JOIN tbl_beneficiaries b ON a.beneficiaries_id= b.beneficiaries_id WHERE sapform_id ='$id'");	 
	    $row = $stmt->fetch(PDO::FETCH_ASSOC);
		echo json_encode($row);
    }
?>