query("SELECT * FROM `addaspatient` WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"); $RowIPD=$IPD->fetch_assoc(); if($RowIPD['typevisit']=='IPD'){ ?>