Is it possible to make a print function that with a click on a button, sends a $variable direct to my printer ?
Thanks in advance Michael
Only if you run this locally. Not if you do this over the web.
Would be a bit of a security issue, if you could do this to someone elses printer..
J.
Sorry... not to my printer .. but to the viewers printer. I'm making a invoice system where my clients should be able to print their invoices from their profile on my site..
The invoice is put in a $variable and echo'ed on the screen and it is this variable they should be able to print.
Well, you can use some Javascript to invoke the browser's print feature, but that's about it...
<p>Click <a href="#" onclick="window.print()">here</a> to print!</p>
Thanks
And what will it print ? The whole site or can I choose what to print some how ?
It will print everything on that page.
If the information is contained within an IFRAME, perhaps you print just that IFRAME, but I'm not sure.