I have a form, in whmcs that I want user to only be able to submit once, so they cant submit it and refresh to resubmit… I was thinking about unsetting $_POST or redirecting, but neither would work in this situation, how would I generate a key and make it so its only usable once? Can’t use mysql.
Share
Why not store a random key in the session? That’s how most CRSF token systems work: When loading the form, generate the key and save it in the session and include it in the form. When submitting, compare the keys and delete the saved key.
If you just don’t want the user to accidentally resubmit a successfully submitted form, the link from @zerkms’ comment is what you want: http://en.wikipedia.org/wiki/Post/Redirect/Get