0
I have a function
in Javascript that runs a PHP code, in this PHP I open connection to the database and send data if some entries receive 1 (waiting 1 minute to change their status).
When I refresh the page before this 1 minute, run Javascript and PHP again, thus creating a new connection to the database and creating more than one run record.
What can I do? Can I stop running PHP code when updating the page? It would be easier to finish database connections when running PHP?
You can perform a validation before entering the new record. Checks whether at a given time such an Internet candidate in the bank is already present, if it is, simply ignores the new Internet.
– Andre Cardoso