Results 1 to 3 of 3

Thread: php pagebreaks

  1. #1
    Join Date
    May 2014
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default php pagebreaks

    Hi guys, I need help understanding pagebreaks. My intention is to print another
    page each time another row is extracted. the document doesn't fill the page.
    The following code will break if a file overfills a page but not needed here.
    Also, it shouldn't print "Page 1" or "Page 1". Thanks
    ========================================================================
    PHP Code:
    <html><head><title>Invoice</title>    
    <style>
        @page { size 8.5in 11in; margin: 2cm } 
        div.page { page-break-after: always }
        </style>
    </head><body bgcolor="#D4FFAA"><center>
    <div class="page">
    <?php
    -----------
    <?
    php   
    echo "Page 1";
        
    ?>
        </div>
        <div class="page">
        <?php"Page 1";  
      }    
      } 
       
    ?>
    </body></html>

  2. #2
    Join Date
    Jul 2014
    Location
    Atlanta, Georgia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey, Its totally wrong script. Please review and re-post it again.

    Thanks

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Looks like it's not so much wrong script as not really a script. It doesn't appear to do anything. Also, to not print 'Page 1', use a print stylesheet.
    Last edited by jscheuer1; 07-02-2014 at 02:02 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •