<?php
   $cc=0;
 
if(isset($_POST["searchValue"]))

{
//echo $time=Date("H:i:sa");
	$searchValue= $_POST['searchValue'];
   //CHECKING ENDS HERE

  require_once"labClass.php";

  $con=new labClass();

  $rQ= $con->getConsultantBySearch($searchValue);

               //print_r($rQ);
  if ($rQ->rowCount()>0) {

    $chp=$rQ->fetchAll();
      ?> 
 <table class="table">
     <th>
        <small><h6>S/N</h6></small>
      </th>
      <th>
        <small><h6>CONSULTANT</h6></small>
      </th>
       <th>
        <small><h6>CASH PRICE</h6></small>
      </th>
       <th>
        <small><h6>NHIF PRICE</h6></small>
      </th>
        
       <th>
        <small><h6>SEND</h6></small>
      </th>
     

   
  <?php

 foreach ($chp as $key => $p) {
//recID drCategory  nhifPrice cashPrice regDate 
    $recID=$p['recID'];
    
      $cc++; 
     
        ?>


 <tr>
      
     <td colspan="5">
       <sup id="rdn<?php echo $cc;?>" class="text-danger" ></sup>
     </td>
   </tr> 
  <tr>
  
 
  
   <td width="3%"> <?php
          echo $cc;
       ?>  
    </td>
<td width="50%">
       <input type="hidden" name="recID<?php echo $cc;?>" id="recID<?php echo $cc;?>" value="<?php echo $p['recID'];?>"/>
    <!--<div class="input-group">
    <span class="input-group-text">-->

     <textarea style="width:100%; height:35px; border-radius:12px; background-color:white;" disabled="true" name="drCat<?php echo $cc;?>" id="drCat<?php echo $cc;?>"><?php echo $p['drCategory'];?></textarea><br/>
         
  
  </td>
  

  <td>
        <input type="text" style="width:100%; height:35px; border-radius:12px; background-color:white;" disabled="true" name="nhifP<?php echo $cc;?>" id="nhifP<?php echo $cc;?>"  value="<?php echo $p['nhifPrice'];?>" />
  </td> 
    <td>
        <input type="text" style="width:100%; height:35px; border-radius:12px; background-color:white;" disabled="true" name="cashP<?php echo $cc;?>" id="cashP<?php echo $cc;?>"  value="<?php echo $p['cashPrice'];?>" />
  </td> 


  <td>
    

        <input type="submit" name="postUpdate<?php echo $cc;?>" id="postUpdate<?php echo $cc;?>" value="SEND" id="submit" onclick="var regDate=$('#sdate').val(); var user=$('#user').val(); var drN=$('#drN').val();var billOp=$('#billOp').val(); var cashP=$('#cashP<?php echo $cc;?>').val(); var nhifP=$('#nhifP<?php echo $cc;?>').val();var drCat=$('#drCat<?php echo $cc;?>').val();var cashP=$('#cashP<?php echo $cc;?>').val(); var patientID =$('#pID').val();if(patientID!=''&& drCat!='' && user!='' && cashP!='' && drN!=''&& regDate!=''&& billOp!=''  && nhifP!='') {$.post('consultaionBillOpPro.php',{patientID:patientID,nhifP:nhifP,drCat:drCat,drN:drN,regDate:regDate,cashP:cashP,user:user,billOp:billOp},function(data){$('#rdn<?php echo $cc;?>').html(data).show();});} else{document.getElementById('rdn<?php echo $cc;?>').innerHTML='Valide pID, bill option and dr incharge required!..';}" />
  </td>
    
     
 
 
</tr> 
 
  <?php
 
}
  $cc=0;

 
}

         
}


?>