Priniting with headers repeated on the next page and page breaks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SSG001
    New Member
    • Oct 2007
    • 110

    #1

    Priniting with headers repeated on the next page and page breaks

    I have printing program in php and html
    where the php varaibles have been echoed in the tabular format
    and this table has heading whch should come on evry page now how do i asertain when there will be page break and and heading repeated again

    something like this(part of code)
    [PHP]<table>
    <tr>
    <td><strong><em >Material</em></strong></td>
    <td><strong><em >Received Qty</em></strong></td>
    </tr>
    <? while($cn<=$m){
    <tr>
    <td><input type='hidden' name='material' value='<?=$mate rial?'>><?=$mat erial?></td>
    <td><input type='hidden' name='recqty' value='<?=$rec_ qty?>'><?$rec_q ty?></td></tr>

    <? $m++;
    } ?>[/PHP]
    //this is a part of code now his shows the material but once material list exceed next page no header is dispalyed
    //how to do this


    Thanks in advance
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    PHP does not do any printing, it is a server side script language and cannot print to a client spool. You use the JavaScript print function for that, or the print button of your browser.

    What you need to do is to count the number of table entries you want to be displayed on each page-to-print and, when that count has been reached, create a page eject, show the table header lines and start counting again.

    Ronald

    Comment

    Working...