<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header">Pending List</h1>
                </div>
                <!--end page header -->
            </div>
<?php $iff = 47125;
 $qry2 = "SELECT * FROM customerdetails where hpl='$iff'";
   //$qry2 = "SELECT * FROM customerdetails where mfin='$mfin'";
	  $rs = mysqli_query($conn, $qry2);
	  // Loop the recordset $rs
	// Each row will be made into an array ($row) using mysqli_fetch_array
	while($row = mysqli_fetch_array($rs)) {
$x = $row['hpl'];
$mfin2 = $row['mfin'];
$idd = $row['id'];
$cc = 'Closed';
$aa = 'Active';
$sz = 'Sized';
$rl = 'Reloan';

$qry8=mysqli_query($conn, "select * from net where mfin='$mfin2' &&  hpl='$x'");
				$row8=mysqli_fetch_array($qry8);
				$n8=mysqli_num_rows($qry8);
$qry89=mysqli_query($conn, "select * from user where mfin='$mfin2' &&  hpl='$x' && status='$rl'");
				$n89=mysqli_num_rows($qry89);
		if($n8>0){
			$update=mysqli_query($conn, "update customerdetails set status='$cc' where id='$idd'");			
		}
		elseif($n89>0){
			$update=mysqli_query($conn, "update customerdetails set status='$rl' where id='$idd'");			
		}
else {
	$update=mysqli_query($conn, "update customerdetails set status='$aa' where id='$idd'");
}
echo $idd; echo "-";		
		
	 }	  ?>
			
 </div></div>
 
 
</div>
</div></div>
</div><?php include "layouts/footer.php"; ?></body></html>