<?php
if($_POST["vital"] && $_POST["patientID"] && $_POST["user"] && $_POST["sdate"] && $_POST["unit"])
{ 
  $patientID= $_POST['patientID'];
  $user= $_POST['user'];
  $sdate= $_POST['sdate'];
  $unit= $_POST['unit'];
  $vital= $_POST['vital']; 
  //CHECKING ENDS HER
  require_once"labClass.php";
  $con=new labClass();
   $Q= $con->getThisPatientD($patientID);
  if($Q->rowCount()>0)
    {
   $rQ= $con->vitalS($patientID,$user,$sdate,$vital,$unit);
   if($rQ->rowCount()>0)
      {
      ?>
      <h6 class="text-success">Save!..</h6>
      <?php
      }
     }
  else{
       ?>
       <h6 class="text-danger">Invalid patient ID!..</h6>
       <?php
       }
       }
  else{
       ?>
       <h6 class="text-danger">All field required!..</h6>
       <?php
       }
?>