Jump to content

help with a print function


samoht

Recommended Posts

Hello again,

 

I have an order confirmation process - at the end of which is a view of the order and a message saying "thank you... to continue shopping click here... or print a copy for your records."

 

I have to much going on in the page to just print the screen - so I would like to set up a print page that is stripped down to the order and the relevant info from the page.

 

any Idea on the best approach??

 

should I make a print.php and just link there passing the order info?

Or should I write a function that prints only certain info from the current page??

Link to comment
https://forums.phpfreaks.com/topic/71423-help-with-a-print-function/
Share on other sites

You can use css for this. Look into CSS print media.

 

Basically you set all the elements in your page to display:none; that your don't want to be printed in your print stylesheet, call this stylesheet print.css for example. You then link to this style sheet using a link tag in the head, eg:

<link rel="stylesheet" media="print" href="print.css" type="text/css" />

 

When a user goes to print the page your browser will use the print.css file rather than your normal stylehsheet.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.