Refresh button if you don't want user to be inserting the data once again you can use the username as unique so it will give you error.