You can handle it in PHP as well (or better).
When you display the form, put a hidden form variable in there that is unique (probably from [man]uniqid[/man]). When the form is submitted, put that field into the database too.
When submitting the form, first check to see if a record with that identifier has already been inserted. If it has, you know it is a double-post and can ignore it. You can even declare that column in the database "unique" so that it is impossible to accidentally double-post.