<?php
if($_POST["iname"] )
{  
	$iname= $_POST['iname'];  
  //CHECKING ENDS HER
  require_once"labClass.php";
  $con=new labClass();
  $Q= $con->getThisItem($iname);
  if($Q->rowCount()>0)
    { 
   
    $iq=$Q->fetch();
    $qty=$iq['iqty'];
      ?>
      <h6 class="text-success">Drug name:<?php echo $iname;?>.</h6>

      <h6 class="text-success">Stock level:<?php echo $qty;?>.</h6>
      <?php
       
       }
  else{
       ?>
        <h6 class="text-danger">Item does not exist!..</h6>
       <?php
       }
       }
  else{
       ?>
       <h6 class="text-danger">All field required!..</h6>
       <?php
       }
?>