Hello!
Tell me how to do better.
There is a form validated by javascript. After the data is pushed into variables and the POST request for the * .php file flies away, there is a check in the file for the presence of a variable in the _POST array, if there are variables, it is written to the MySQL database. The problem is that if you update the page on which the user arrives, the data in MySQL is written again. Tell me how you can organize a check so that when you refresh the page, the data will not be recorded again. For what it is needed, there is a feedback form on the site, the user types a review, indicates a name, a review, attaches a photo. Further, the data is validated and flies to another file, in another file they are expanded in variable form, the ID and moderation flag are hung.
What are my thoughts: Add some data to the table that can be pulled and the user's PC, let's say IP, let's say a browser cast. Then compare.
Please do not offer AJAX, it has not yet been studied TT. But if you insist and say that it is very easy and cool, then nothing remains.