Jump to content

Recommended Posts

I've written a form that allows employees to enter their timesheets, which, after submitting, get saved to a MySQL table. The results are shown in a nice, printer-friendly page with no company headers (in the print.css stylesheet) and set to an absolute <gasp!> width/height, etc.  The admin wants a one-click way to be able to print all the timesheets submitted.  Is there a way to cycle each of the MySQL entries through my view.php page?  (Making sure that each one gets a completely separate page, of course....)

 

Thank you so much!!

 

Levi  ???

Sorry, I realize now I wasn't very clear.

 

I have a MySQL table with entries for user_id, time_in, time_out, etc.  And I have a great little "view.php" page which takes *one* of those MySQL entries and shows it very nicely on the screen.  When printed, the timesheet comes out on a single piece of paper.  What I need to do is have a single button/click/function that will take multiple MySQL entries, send each of them through the view.php formatting, and print them each on a separate page.  That way, the admin office will have a hardcopy of each employee's timesheet.

 

Thanks!!

You can't do that with just PHP, you need to use CSS, and PHP.

 

so, if my reading is correct, this should work:

 

CSS:

<style type="text/css">
.pageBreak{
page-break-before: always;
}
</style>

 

Page 1

<div class="pageBreak"></div>

Page 2

<div class="pageBreak"></DIV>

Page 3

<div class="pageBreak"></DIV>

Page 4

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.