<?php
  $cc=0;
  $tPrice=0;     
  $ttprice=0;
  require_once"labClass.php";
  $con=new labClass();
  ?>
<table class="table"> 
     <th>
        <small><h6>S/N</h6></small>
      </th>
      <th>
        <small><h6>NAME CUSTOMER</h6></small>
      </th>
       <th>
        <small><h6>STREET</h6></small>
      </th>
       <th>
        <small><h6>WARD</h6></small>
      </th>
       <th>
        <small><h6>DISTRICT</h6></small>
      </th>
       <th>
        <small><h6>REGION</h6></small>
      </th>
      <th>
        <small><h6>PHONE NO</h6></small>
      </th>
     
      <th>
        <small><h6>DATE REGISTERED</h6></small>
      </th>
      
<?php
if($_POST["cname"])
{
 $cname=$_POST["cname"]; 
 $chkp= $con->getThisAgRecByN($cname); 
}
if($_POST["street"])
{
 $street=$_POST["street"]; 
 $chkp= $con->getThisAgRecByS($street); 
} 
if($_POST["ward"])
{
 $ward=$_POST["ward"]; 
 $chkp= $con->getThisAgRecByW($ward); 
} 
if($_POST["district"])
{
 $district=$_POST["district"]; 
 $chkp= $con->getThisAgRecByD($district); 
} 
if($_POST["region"])
{
 $region=$_POST["region"]; 
 $chkp= $con->getThisAgRecByR($region); 
} 
if ($chkp->rowCount()>0) {

  $chp=$chkp->fetchAll();
 foreach ($chp as $key => $p) {
 $recID=$p['recID'];
  $cc++; 
  ?>
   
  <tr>
   <td width="5%">
       <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">-->

      <?php
          echo $cc;
       ?>  
      </td>
       <td width="30%"> <?php echo $p['cname'];?> 
  </td>
  <td> <?php echo $p['address'];?>
  </td> 
   <td> <?php echo $p['ward'];?>  
  </td>
   <td><?php echo $p['district'];?>  
  </td>
   <td><?php echo $p['region'];?> 
  </td>
  <td>
     <?php echo $p['phone'];?>   
  </td>
 
  
  <td> 
     <?php echo $p['regD'];?>    
  </td>
</tr>
 <?php 
  }
  }
   
?>
</table>
</div> 
 