07-15-2017, 02:56 PM
I've opted to go with moving the token check and generation to the header and echoing $token in each form. Most of my employees aren't too tech-savvy and will try to submit a form multiple times (or even order the same item for a customer several times), and it was easier for me to use the CSRF check already in place than to code checks to see if a form was already submitted.
In other projects though I've used something similar to the library that Firestorm posted above.
In other projects though I've used something similar to the library that Firestorm posted above.