Hi, got a prob. My code works great except that it only displays 1 line. Please advise.
----------------------------------------------------------------------------------------
the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php error_reporting (E_ALL ^ E_NOTICE);
// Include config file
require_once "getprerentdb.php";
//MySqli Select Query
$results = $mysqli->query("SELECT * FROM payfile");//Print version
//Set at what record to break at 25 records per page
$BreakAT=25;
$num=0;
$pagenum = 1;
$totpaid=0;
// ---------------------------------------
while($row = mysqli_fetch_array($results)) {
// ----------------------------------------
if($num % $BreakAT == 0)
{
if($num>0)
{ echo '</table class="print">';
echo '';
$pagenum++; }
echo date('m/d/y');
echo " Page " . $pagenum;
?>
Payment Report
----------------------------------------------------------------------------------------
the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php error_reporting (E_ALL ^ E_NOTICE);
// Include config file
require_once "getprerentdb.php";
//MySqli Select Query
$results = $mysqli->query("SELECT * FROM payfile");//Print version
//Set at what record to break at 25 records per page
$BreakAT=25;
$num=0;
$pagenum = 1;
$totpaid=0;
// ---------------------------------------
while($row = mysqli_fetch_array($results)) {
// ----------------------------------------
if($num % $BreakAT == 0)
{
if($num>0)
{ echo '</table class="print">';
echo '';
$pagenum++; }
echo date('m/d/y');
echo " Page " . $pagenum;
?>
Payment Report
tenant | unit | rent paid | rent due | due date | prev bal | late chg | sec dep | damage | court cost | nsf | hud pay | tenant pay | date paid | comment |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
' . $row['tenant'] . ' | ' . $row['unit'] . ' | $'.number_format($row['amtpaid'],2).' | $'.number_format($row['amtdue'],2).' | ' . $row['duedate'] . ' | $'.number_format($row['prevbal'],2).' | $'.number_format($row['latechg'],2).' | $'.number_format($row['secdep'],2).' | $'.number_format($row['damage'],2).' | $'.number_format($row['courtcost'],2).' | $'.number_format($row['nsf'],2).' | $'.number_format($row['hudpay'],2).' | $'.number_format($row['paidsum'],2).' | ' . $row['datepaid'] . ' | ' . $row['comments'] . ' |
Total Paid: | ' . number_format($totpaid, 2, '.', '') . ' |