View Full Version : Submiting a form, and then clicking refresh multiple times to resend the data
09-29-2006, 09:40 PM
On my comments page for a news story on my site...
When users add a comment, they can keep clicking refresh and then enter and it keeps adding their comment over and over again.
How can i disable them from refreshing the page to resend their data?
09-30-2006, 03:13 AM
You just need to direct them to a new page after submitting the comment. Then refreshing will just refresh the page their on.
The general idea of submitting anything is this:
Begining page -> Click submit
-> data goes to another submit page which imports the data and...
-> sends them back to begining page
So if they are on your article page, say, "article.html", then hit submit which sends data to "process.php", this page then sends them back to article.html with an empty comment form, and their new comment on the top or bottom or whatever you do.
Or, whatever language you're using to submit, when you have a successful submit, destroy the data so it can't be submitted again via refresh.
Hope that helps. I always create a php data processing file that does all my site's submitting, and then sends them back to whatever page they were on.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.