samoht Posted October 1, 2007 Share Posted October 1, 2007 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?? Quote Link to comment https://forums.phpfreaks.com/topic/71423-help-with-a-print-function/ Share on other sites More sharing options...
bonaparte Posted October 1, 2007 Share Posted October 1, 2007 I recommend a new print.php where you can print the order info. Quote Link to comment https://forums.phpfreaks.com/topic/71423-help-with-a-print-function/#findComment-359519 Share on other sites More sharing options...
wildteen88 Posted October 1, 2007 Share Posted October 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/71423-help-with-a-print-function/#findComment-359523 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.