Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.