User data coming in twice? troubleshoot advice?
Ok I have a php script: the flow is this:
User comes to our data entry page
Details go into our system (which updates if same email address used again)
Details go into an external system (which DOESNT UPDATE)
User is then shown a success message.
(If user refresh the page, they will be shown the form again and their system will not automatically go through again)
Now in the external system, they have some user data that are coming in twice? I am not sure what could possibly be wrong or why this is happening?
The only reason I could think of is if the page timed out and the user retried again thinking their details didnt go through? but the amount of duplicate is high AND sometimes the duplicate data is seconds apart i.e. 3 seconds or so?
Now i have added something to stop it pushing the leads twice but I would like to know what could be the possible reason? I also tested my script multiple times and each time it only sent one lead.
How is data being pushed from your first page to your external system? cURL or something? You will need to trace out your workflow. I find adding many lines such as syslog(LOG_INFO,'some info'.print_r($someArray,1)); all over the place so I can figure things out.