How to print a web page using php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shellom2005
Forum Newbie
Posts: 1
Joined: Fri Jan 02, 2009 12:48 pm

How to print a web page using php?

Post by shellom2005 »

hi ,how to print a web page using php.I'm new and i have very little php knowlege.please help!
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: How to print a web page using php?

Post by omniuni »

If I catch your question correctly, I don't think you even need PHP.

Code: Select all

<input class="NavButton" id="btnPrint" type="button" value="Print Me!" onclick="window.print();">
That triggers a print dialogue.

If you want, you can have PHP generate a new page, though, with more printer-friendly CSS, or simply write a CSS file that is specified for print media.
Post Reply