Jump to content

php to send to printer


turpentyne

Recommended Posts

my client changed their mind, and wants a field in the database that toggles to 'printed' if they've printed. I had a simple javascript that generates a button:


<style type="text/css" media="print">
@page { size:8.5in 11in; margin: 1cm }
.printbutton {
  visibility: hidden;
  display: none;
}
</style>

<script>
document.write("<input type='button' " +
"onClick='window.print()' " +
"class='printbutton' " +
"value='Print This Page'/>");
</script>

 

But I'm assuming I ought to do this with php  - or would it be jquery? , so that when they click the button, I can do a query update to the database. But I  can't find any tutorials on it. Searching for it, just brings up the php command, "print" grrr.

Link to comment
https://forums.phpfreaks.com/topic/258386-php-to-send-to-printer/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.