I would like to tell you how to avoid double data loading to the impatient user and press refresh in the browser. I’ve seen this problem in even, many programs online shopping, resulting in that the user receives duplicate order, and it is also invoiced twice. Notice that the basic procedure that I’m going to describe is not dependent on the database (although use MySQL in my example) nor the language of programming (PHP) or operating system (Linux). It would also serve if SQL Server, with ASP.NET, Windows Server 2008, although with its own syntax. It is not necessary to say that users are not very happy with us. Yes, the problem was caused by them, but we still had the responsibility to handle the situation better.
Our table will be called Bills. This is what I’ll do: generate a unique code randomly. Move that code to the browser. The browser returns me this code, along with the rest of the information. The code is stored with the info, indexed with a unique index. Thus, if customer recharges page and the information is loaded twice, the first time all go well. But the second time I have a unique index violation and will be rejected by the database engine. Are you interested in this solution? Leela completely on my web site.