faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 20 people (60%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I use PHP to print user input form data to a printer attatched to the server

Mar 19th, 2000 19:43
Dave Garth, Roy Stevens,


If you are on a unix system it should just involve piping output to lpr. 
In your script use popen, $fp = popen("/usr/bin/lpr","w"); and then just 
fputs to $fp. Then use pclose to close the connection. This should work, 
although I haven't tried