我如何通过PHP知道该页面已打印并在mysql中更新 [英] How do I know via PHP that page printed and update in mysql

查看:197
本文介绍了我如何通过PHP知道该页面已打印并在mysql中更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有php网站,它是workind一样的计费系统..

我有收据,发票等.

我在mySQL数据库主表中有问题,在Main_table变量how_much_中已打印,并通过php和mySql我需要对其进行更新!每次用户甚至执行ctrl P

我该怎么办?

原因是在法律上我需要在第一个文档上打印其原始文档.

我没有找到任何方法,所以我决定使用CSS阻止打印,并单独打印网页-如果有人可以找到它,这看起来很难看?

非常感谢您的帮助


我尝试过的事情:

我试图搜索互联网..

我用文档ID构建了一个单独的页面来更新,它看起来很糟糕

Hello i have php website that is workind like system for acounting..

i have receipt, invoice etc..

i have a problem in mySQL data base main table i have in Main_table variable how_much_ printed and via php and mySql i need to update it ! every time that user does even ctrl P

how do i do that ?

the caus is that in law i need to print on thefirst document that its source document..

i didn"t find any way so I decided to block the printing with css and do printing web page seperatly - its looks ugly if someone can find way ?

Thanks alot for help
Yan

What I have tried:

i tried to search internet..

i builded sepered page with id of the document to update and it looks bad

推荐答案

如果您只想在用户按下ctrl + p时进行更新,然后使用jquery或JS键新闻发布会
然后manke ajax调用服务器以更新Table,但是您将无法知道报告是否实际打印
If you just want to update when user Press ctrl+p then use jquery or JS key press events
and then manke ajax call to server for updating Table but you wont be able to know whether report was actually printed or not


这篇关于我如何通过PHP知道该页面已打印并在mysql中更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆