The easiest way is to do something like use a unique ID type string (you know, the ones like 00-acfe0234-ef4efa-000190, there are generators all over the web for them) or a time stamp and put it in the form when the user first opens it up. I.e. the initial form has something like:
<input type="hidden" name="uniq " value="103049203">
And then insert that into a unique index when you put it in the database.
If the user hits back and submit again, they get an error stating that they can't insert that record because it has already been inserted.
Further, you could detect that it exists, then use an update instead to make changes.