<?php
include("common/connection.php");
$lead_id=$_REQUEST['per'];
$sql="select * from patient_agreement  where Lead_ID='".$lead_id."'";
$query=mysqli_fetch_array(mysqli_query($con,$sql));

if($query['Agreement_Confirm']==1)
{
echo 1;
}
else
{
echo 2;
}
?>