Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8344927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:31:28+00:00 2026-06-09T06:31:28+00:00

This may be asked in multiple forums but I just can’t get it working.

  • 0

This may be asked in multiple forums but I just can’t get it working.

I have php to get records from the database and output in table format.

my sample code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body vspace="0" hspace="0" onload="window.print();">
<Table width="100%" border="1" cellpadding="0" cellspacing="0" align="center" vspace="0">
<thead>
   <tr style=\"background-color:#D8D8D8;color:#000000;font-weight:bold;height:50px;\">
     <td width=\"100\" align=\"center\">Date</td>
     <td width=\"80\" align=\"center\">Adult</td>
     <td width=\"80\" align=\"center\">Child</td>
     <td width=\"80\" align=\"center\">Total</td>
     <td width=\"450\" align=\"center\" colspan=\"2\">Remark</td>
   <tr>
</thead>
<tbody>

  <?php loop scripts 
    <TR>
   // need to have a page break here if record rows is 23 
   // the number records that can fit in a page is 
   // 21 rows per page (laserjet printer selected)
   // 23 rows per page (pdf printer selected) i prefer pdf printer
    </tr>
  ?>
</tbody>
<tfoot>
  <?php "<tr><td>".calculation and displays sum of Adult, sum of Child and sum of Total."</td></tr>" ?>
</tfoot>
</table>
</body>
</html>

my issue is that i have used “page-break-before:always” in another page with table format and it works. That is table within table (new table for each record with sql join statement). I have whatever solution i can possibly find on the net to do this page break but to no avail. my next issue is using table header which doesn’t work at all. It supposedly repeat the onto the next page but it doesn’t.

what am i missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:31:30+00:00Added an answer on June 9, 2026 at 6:31 am

    Have you tried this:

    {
    h1 {page-break-before:always}
    }
    

    And use H1 after every 23 rows?

    <td><h1>Here we start new page</h1></td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this may just be the dumbest question I have asked yet. But I can
This question may have been asked before, but I'm starting to get into game
This may have been asked already, but I can't find it, so here goes.
This may be the silliest question i have ever asked here, but i just
This may be the silliest question, I've ever asked, but I just can't find
This may have been asked multiple times, but is there a good HTML-to-PDF creator
This may have been asked before and I just can't find it. I have
This question may have been asked before, but I had trouble finding an answer,
This has / may have been asked before, but, as far as I remember,
This may have been asked before, but I could not find the answer. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.