<?php
include("common/connection.php");

$yesterday=date('Y-m-d',strtotime("+1 days"));;
$delete_agreemnt=mysqli_query($con,"update patient_agreement set End_Date='".$yesterday."',Deleted='1' where Lead_ID='".$_REQUEST['par']."'");
$fetch_id=mysqli_fetch_array(mysqli_query($con,"Select Patient_Id from patient_master where Lead_ID='".$_REQUEST['par']."'"));

$update_roster=mysqli_query($con,"update roster_master set Active='1' where Treatment_Service_Date>'".date('Y-m-d')."' and Patient_Id='".$fetch_id['Patient_Id']."'"); 
?>