Generate ID automatically, search and bring it back the ID to use [on hold]

I have a doubt about this problem:

When i open a new register, it must show me the consecutive ID
automatically, but if the other user open the register too and show
him the consecutive ID automatically, we are going to register at same
time and real time, when if i want to cancel my register while the
other user could save the register, now come a new user to register
and from there search and bring it back the ID where i canceled the
register before

i’m open to suggestions, advices, everything to solve this problem.
I’m working with php, html5 and javascript.


Source: html5

Leave a Reply