<?php
  
 
if($_POST["user"] && $_POST["sdate"] && $_POST["sID"] && $_POST["comp"] && $_POST["patientID"] && $_POST["hpi"] && $_POST["gExam"])

{
   $patientID= $_POST['patientID'];
   $gExam= $_POST['gExam'];
	 $hpi= $_POST['hpi'];
   $sdate= $_POST['sdate'];
   $user=$_POST['user'];
   $comp=$_POST['comp'];     
   $sID=$_POST['sID'];
   
  //CHECKING ENDS HER
  require_once"labClass.php";
  $con=new labClass();
  $Q= $con->getThisPatientD($patientID);
  if($Q->rowCount()>0)
    {
     
      $rQ= $con->pComplain($sID,$sdate,$comp,$user, $gExam, $hpi,$patientID);

                if($rQ->rowCount()>0)
                {
                ?>
                <h6 class="text-success">Save!..</h6>
                <?php
                }
    }
  else{
       ?>
                <h6 class="text-danger">Invalid patient ID!..</h6>
       <?php
       }
  
  }
?>