Just have the page that is specified as the form TARGET do everything it needs to do with the data, then use a:
header("Location: thankYouPage.php");
to re-direct the browser to another page that says "Thanks" or something and have a big "Back to Main Page" link on it. That will solve about 99% of "re-submit" problems. Most re-submits are caused by browser refreshes, not people actually pressing the submit button multiple times.
Of course, witht the above method, the visitor could still hit the back button to the form and press the submit button again...
If you really have a problem with that, then you will have to use sessions or what I have done in the past (when sessions are needed for anything esle) is this:
1) Create a table called "formcheck" with one field, a timestamp.
2) When you generate the form, put a HIDDEN field on it with the current timestamp.
3) When you process the form, check for the timestamp variable in the formcheck table. If it's there, you have a double post; if not process the form and add the timestamp to the formcheck table.
4) use a periodic chron job to delete formcheck table entries more than, say, an hour old.
Unless your up to about 10,000 form submissions / hour, this should not slow down the processing significantly, especially if you are already hitting the database for other stuff.
-- Rich Rijnders
-- Irvine, CA US