I have a php auction bid script, the problem is when the bid get over the script makes an ajax call and update all the users bid at once. What is happening is if two users simultaneously opened the page and the auction is over the piece of code runs twice which makes the data corrupted.
Is there any way to prevent this problem ?