简体   繁体   English

如何在不打开表单的情况下将条形码阅读器发送的值输入表单的文本字段?

[英]How to input a value sent from a barcode reader to a form's text field without opening the form?

I have developed a very basic attendance taking system using barcode reader with PHP-MySQL. 我已经开发了一个非常基本的考勤系统,它使用带有PHP-MySQL的条形码读取器。 I have a form and there I have only one text input to receive value from barcode. 我有一个表格,只有一个文本输入可以从条形码中接收值。 After the form is submitted (my barcode reader automatically triggers submit) my script does some processing and then inserts values into my mysql database. 提交表单后(我的条形码阅读器自动触发提交),我的脚本进行了一些处理,然后将值插入到我的mysql数据库中。 This is working fine, but the problem is every time when someone gives attendance the operator needs to stop other works and open the form and keep it that way until the attendance giving is finished. 这很好,但问题是每次有人出勤时,操作员都需要停止其他工作并打开表格,并保持这种状态,直到出勤完成为止。

Now, is there any way by which I can create the the system like the operator doesn't have to open the form or pay any attention to it every time someone gives attendance? 现在,有什么方法可以创建系统,就像操作员不必每次有人出席时都打开表格或对其进行任何关注一样? For your information I am running the application on local host. 供您参考,我正在本地主机上运行该应用程序。

Thanks in Advance :) 提前致谢 :)

Hope that I understood you right. 希望我理解你对。 Correct me if not. 如果不是,请纠正我。

When your barcode reader-software is able to do so, or if you can create a small program for the task: 当条形码读取器软件能够执行此操作时,或者您可以为该任务创建一个小程序时:
The barcode reader software could run the default webbrowser with the forms url. 条形码阅读器软件可以运行带有形式url的默认Web浏览器。 Let the form url be http://localhost/form.php and use the GET method. 让表单url为http://localhost/form.php并使用GET方法。 So your software could send the data to the php script by querying http://localhost/form.php?data=12345 . 因此,您的软件可以通过查询http://localhost/form.php?data=12345将数据发送到php脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM