I've written a program that deals with finances. The entry page (amounts.php) calls a class "recdata.cls" to record the information and then return to the amounts.php page. The problem is that if someone hits the refresh button another duplicate entry is recorded in the database causing an accounting error! Does anyone have a method or code to inhibit the refresh & back button? TIA, Dick Deeds
check for duplicates, will solve bot theses problems and stop something one typing it in twice.
First, Thanks for the response. I tried using $_SESSION variables in both the class model and the php module. So I guess my question(s) are: 1. How do you compare?? That shows I don't really understand what the browser is doing. Evidently, it does not cycle through the php or class modules. 2. How do you redirect? TIA Dick Deeds
Try adding a "processing" page.
You will see that when you post a thread on this forum, it goes to a processing page then back to the topic with a header redirect.
You could do the same. Then when someone clicks refresh it won't matter.