c2lite21 Posted December 16, 2006 Share Posted December 16, 2006 Im still a student, im not really good at programming but i can understand basic programming, i have this school project. Hotel reservation w/ billing system, Im having difficullty on it a close friend of mine is helping me but one of our problems is we dont know how to code a "button" that will print the bill of the customer in billing side of the system, we dont want to use the file print of the browser because that will print the whole page and it is not suited if we will print a long bond paper just for the receipt of a customer, the teacher would question me there, we need a code that will print a suitable size for the receipt hope that you could help me, cause Im running out of time, a.s.a.p thank you Link to comment https://forums.phpfreaks.com/topic/30846-print-button-help/ Share on other sites More sharing options...
bljepp69 Posted December 16, 2006 Share Posted December 16, 2006 The print function IS a browser function. You don't have any control over the page sizes, printers, orientation, etc. That's for the user to decide. From the browser window, basically all you can do is call the print function. Easiest is with a print button using javascript.[code]<input type="button" name="print" value="Print this page" onClick="javascript:window.print()">[/code] Link to comment https://forums.phpfreaks.com/topic/30846-print-button-help/#findComment-142250 Share on other sites More sharing options...
kenrbnsn Posted December 16, 2006 Share Posted December 16, 2006 You can control what is printed via CSS.This has nothing to do with PHP.Ken Link to comment https://forums.phpfreaks.com/topic/30846-print-button-help/#findComment-142255 Share on other sites More sharing options...
Hypnos Posted December 16, 2006 Share Posted December 16, 2006 Have your script generate a printer friendly HTML bill to be printed... Link to comment https://forums.phpfreaks.com/topic/30846-print-button-help/#findComment-142294 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.