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

{

  $searchValue= $_POST['searchValue'];
            //CHECKING ENDS HERE

  require_once "labClass.php";
  
  $con = new labClass();
  
 $chkp= $con->getInvPrevItemBySearch($searchValue); 
    
     
if ($chkp->rowCount()>0) {

  $chp=$chkp->fetchAll();
  ?>
  <table class="table"> 
   
<?php
 foreach ($chp as $key => $p) {
    $orderID=$p['orderID'];
      $cc++; 
     
        ?>
 <tr>
     
   </tr> 
  <tr>
   <td colspan="5">
    <sup id="rdn<?php echo $cc;?>" class="text-danger" ></sup>
       <input type="hidden" name="orderID<?php echo $cc;?>" id="orderID<?php echo $cc;?>" value="<?php echo $p['orderID'];?>"/>
    <!--<div class="input-group">
    <span class="input-group-text">-->

       Customer name:<br/>
       <a href="#" onclick="var orderID =$('#orderID<?php echo $cc;?>').val();  
         if(orderID!='' ) {$.post('delHPInvoiceItList.php',{orderID:orderID },function(data){$('#co').html(data).show();});} else{document.getElementById('rdn<?php echo $cc;?>').innerHTML='Valide item detail required!..';}">
           <?php echo $p['orderID'];?> </a>.<font color="blue"><sup id="cn<?php echo $cc;?>"><?php echo $p['cname'];?></sup></font> 
  </td>
 
  <td>
    Order amount:<br/>
  <?php echo $p['payableA'];?>
  </td> 
  
   
   
</tr> 
  <?php
}
$cc=0;
 
}
}
  ?>