After a form is submited and inserted to the database, if the user hits the
refresh button the data is again inserted to the database (there is a popup
message about re-inserting the data, but if the user clicks ok, then it gets
reinserted again)

How can I prevent the data from being reinserted again?

Thanks