Forum Moderators: coopster

Message Too Old, No Replies

how to did print a report using PHP

         

hsceeus

2:13 pm on Mar 24, 2006 (gmt 0)

10+ Year Member



i would like to know how to print the infomation that reside in the table in the page. i do not want any header or button will also print out...

RonPK

2:48 pm on Mar 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP is a server-side scripting language. It does not control client-side output such as a print version.

Your best bet is to use CSS to hide certain elements in the print version of your document:

@media print {
div#header {display: none;}
}

If you're referring to the headers and footers that browsers may add to printed pages: that is a client setting that PHP cannot override. If you really need full control over the print version, you should consider offering a PDF version (which PHP could create on the fly).

HTH