Hello, I'm hoping for help with page break in this code

HTML Code:
<html><head>
<style>
    @page { size 8.5in 11in; margin: 2cm }
    div.page { page-break-after: always }
    </style>
</head><body><center>
<div class="page">
PHP Code:
 <?php 
error_reporting
(E_ALL E_NOTICE);
// error_reporting(0);
mysql_connect('localhost','root','cookie');
mysql_select_db('homedb') or die("Unable to select database");
$query=" SELECT * FROM oocust WHERE payrec = 'P' AND pd = 'N' ORDER BY datepaid ASC";
$result=mysql_query($query);
$num=mysql_numrows($result);
echo 
date('m/d/y');

// unsure re, the below

    
echo "Page 1";
    
?>
HTML Code:
</div>
    <div class="page">
PHP Code:
 <?php
    
echo "Page 2";
   
// 

echo "<font size=+1><b><center> Accounts Payable Report</font></center><br />";
?>
HTML Code:
<table cellspacing=0 cellpadding=0 border=1>
<thead>
<tr>      
<th colspan=4></th>
<th bgcolor="#ccffff">date</th>
<th bgcolor="#ccffff">days</th>
<th bgcolor="#ccffff">amt</th>
<tr>
<th bgcolor="#ccffff">recur?</th>
<th bgcolor="#ccffff">acct#</th>
<th bgcolor="#ccffff">creditor</th>
<th bgcolor="#ccffff">purpose</th>
<th bgcolor="#ccffff">due</th>
<th bgcolor="#ccffff">late</th>
<th bgcolor="#ccffff">due</th>
</tr>
PHP Code:
<?php
while($row mysql_fetch_array($result))
   {
$totdue += $row['amtdue'];   
          echo 
'
            <tr>
                <td>'
$row['status'], '</td>
                <td>'
$row['acctno'], '</td>
                <td>'
$row['bname'], '</td>
                <td>'
$row['purpose'], '</td>
                <td>'
$row['duedate'], '</td>                
     <td align=right class="currency">'
, ($late 120 'pastdue' $row['dayslate']), '</td>
     <td align=right class="currency">'
number_format($row['amtdue'], 2'.'''), '</td>
   </tr>'
;
    }     
    echo 
'
      <tr>
        <th bgcolor="#ccffff" scope="row" colspan="6">Grand Total:</th>
          <td bgcolor="#FFD4D4" class="currency">'
number_format($totdue2'.'''), '</td>
            </tr>
             </table>'
;
            
mysql_close();
           
?>
HTML Code:
</div></body></html>