Jump to content

clocking in system


mattichu

Recommended Posts

Hi,

 

I have written a PHP clocking in system for staff to use. The user inputs their pin and the time they clocked in/out is recorded in an SQL database on the server.

 

Ive found that the browser (firefox) occasionaly gets stuck when a user presses enter (maybe a dodgy internet connection) and prevents anyone else clocking in until refresh is pressed.

 

Is there a way to store the data locally then upload it to the server every so often? or another way to fix this issue?

 

many thanks!

Link to comment
https://forums.phpfreaks.com/topic/263963-clocking-in-system/
Share on other sites

A system like that will be several seconds between inserts, at least (consider it: one terminal, and a line of people typing in their ids to clock in).  It's definitely not table locking. The problem sounds like the browser is waiting for an HTTP response. The solution will have to be JS-based.

 

Honestly, though, a web-based time and attendance app is really not advisable.  Most T&A systems have multiple servers- one at each reader, and a central app for the facility.  Each card reader runs a local service, and they synchronize with the central DB via queues and daemons, ensuring all data is accurately recorded.  I actually used to develop software for GE Security, so I know quite a bit about designing this type of system.

 

If you want to duplicate that with a browser app, you can use Javascript to mimic a fat-client local service, queueing clock-ins and using ajax to verify that each is stored by the server.

Link to comment
https://forums.phpfreaks.com/topic/263963-clocking-in-system/#findComment-1352779
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.