posted 19 years ago
Hello All,
I have used the saveToken(), isTokenValid(), and resetToken() in my application to prevent double click posts and back button posts. Everything seems to work as intended. This is good, but I have one issue.
I am using an if statement now with the isTokenValid() method.
If it's valid, I run the code that posts my data, if not...
here's my issue. If NOT, I want it to still tell the user that the data has been submitted, and I want to show the user a receipt. This can be done without messing with the database by creating all the variables I need and sending them to the form before I call isTokenValid(). This works for a double click. But if someone hits BACK and changes information in the fields and then hits submit, this will give them a receipt that is false, because that data wasn't submitted.
Any ideas on how to combat this? Or any ideas that you guys have used when using isTokenValid()? Do you just send them to an error page?
Thanks for any help!!!
P.S. Sorry if this is confusing! I can try to be more clear with specific questions!
-Nate