I know I can do disable the button via js, but the user can easily alter that in his browser.
So, I am looking for an easy solution how to do that.
I have tried this SESSION trick https://stackoverflow.com/questions/20766744/php-double-form-submit-prevent
however, I can still click fast and it will save many things in the db.
Also, if I do the does a row with the same user_id, item_id and comment_id in the table reviews exist then stop
condition -> this doesn't work either, when I click very fast on the button.
Does mysql have some function to refuse saving more than one row with the same info?
If something like that exists that would be great.
For example user_id, item_id, comment_id
can be save only once or perhaps using some time prevention to save multiple things.