[eluser]obiron2[/eluser]
but in that example you are not creating a unique database record. If it were a user registration form and the form was processes sucessfully and then the user hits F5 to refresh the page, the $_POST data will be re-submitted and unless you have uniqueness checks turned on in your database or validate for the hidden field you will repost the data.
I have thought of a solution but not tried it yet.
If you open the form URL with target="_new" it will open in a new window. If the data is sucessfully submitted you should be able to call a js script as part of the onLoad() function to $this.window.close()
(Don't quote me on the syntax...)
This way the window will shut itself down when successful and the $_POST will be destroyed.
Obiron