i am writing a comment block in my website. i save the comment in a file and print the contents on the webpage. but the problem is when i refresh the webpage the last comment ge
Here are quick solutions:
After your form has been saved or if it has an error, redirect them to the same page but with GET
variables in the uri like process.php?action=save
. Use header function for redirection.
You also use cookies to save the IP of the person who submits the form and restrict him for certain period to be able to submit the form again.