0

Hi! am new in php, and i want my web application to be able to print the
data displayed on my web page by pressing on the print button.
HELP ME PLEASE,VERY URGENT!

5
Contributors
6
Replies
50
Views
4 Years
Discussion Span
Last Post by albanclesh
2

No, its not urgent to me, no amount of capitals makes it urgent :grin:

dont try to remake the wheel, most users already know where the print button is on their browser
create a print stylesheet that makes the onscreen version, which is one shape, look better on paper, which is a different shape

@media print { /* typeface margins columns images laid out to suit paper */ }
@media screen { /* what you already have */ }

Edited by almostbob

1

As far as I am aware, it wouldn't be possible to do this in PHP as PHP is rendered server side. This means that once it is sent to the client's browser, there is nothing left of it.

At most you could echo out a JavaScript function/button combination to do it.

1

@AHarrisGsy, i thought it is possible to do this with php, just would be more complicated? but yes, javascript is a better choice.

0

Thank you all for your help! i'll try with Javascript and let you know if it works.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.