<?php
	include ('common/connection.php');
	$pid=base64_decode($_REQUEST['viw']);
	$pdate=base64_decode($_REQUEST['pd']);
	$ym=date('Y-m');
	$plandate=$ym."-".$pdate;
	$query_details=mysqli_query($con,"select * from medicine_plan_master where Patient_ID='".$pid."' and Plan_Date='".$plandate."'");
	while($fetch_data=mysqli_fetch_array($query_details))
	{
?>

<label>
<b>Medicine Name</b> : <?php echo $fetch_data['Medicine_Name'] ?> &nbsp;&nbsp;&nbsp; <b>Doses</b> : <?php echo $fetch_data['Doses']." <b>Direction</b> :".$fetch_data['Direction']." ".$fetch_data['Result_3'] ?> &nbsp;&nbsp;&nbsp;<b>TNA Update Time</b> : <?php if($fetch_data['update_Date_Time']!="0000-00-00 00:00:00"){ echo  date('d-m-Y h:i a',strtotime($fetch_data['update_Date_Time']));}else {echo "NA";} ?><br/><br/>
</label>

<?php
}
?>