<?php ob_start(); 
session_start();
?>
<!DOCTYPE html>
<html>
<?php include "layouts/db_connect.php"; ?>
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<!-- Meta, title, CSS, favicons, etc. -->
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="X-UA-Compatible" content="chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<title>INFOSSEL SOFT SOLUTIONS </title>
		</head><body>
		<?php
// PDO connect *********
$ff = NULL;
$sql = mysqli_query($conn, "select * from userm order by fid asc");
$i = 0;
while($row=mysqli_fetch_array($sql)) {
echo "run";
$i++;
	$idd = $row['fid'];
	$mfin22 = $row['mfin'];
	$hpl = $row['hpl'];
		$p3 = $row['urname'];
	$sql5 = mysqli_query($conn, "select * from customerdetailsm where hpl='$hpl' && mfin='$mfin22'");
	$row5 = mysqli_fetch_array($sql5);
	$p1  = $row5['dueamt'];
	$p2  = $row5['interest'];
	$total  = $row5['total'];
	$duemnt1 = $p3 / $total;
	$duemnt = round($duemnt1,0);
	$rno = $duemnt * $p2;
	$pass = $p3 - $rno;
	echo $total;
	$update = mysqli_query($conn, "update userm set bil='$i',roll='$i',rno='$rno',pass='$pass',paymnt='$duemnt' where fid='$idd'");
}

?> </body></html>