07-15-2017, 07:17 PM
argh ok, well I've created a new CSRF Protect class with session storage, i can confirm with 4 forms on a page no more "token not valid" issues, same token per session.
we drop it into classes, will need requiring from init if autoload not present.
we instantiate with:
we automatically insert hidden form field using this in the form:
then we check its valid in our php, so afterwe would do:
hope thats helps some, find the class here: https://github.com/Firestorm-Graphics/CSRF-Protect
we drop it into classes, will need requiring from init if autoload not present.
we instantiate with:
Code:
$csrf = new CSRF_Protect();
we automatically insert hidden form field using this in the form:
Code:
<?php $csrf->echoInputField();?>
then we check its valid in our php, so after
Code:
if(!empty($_POST['copyright1'])){
Code:
$csrf->verifyRequest();
hope thats helps some, find the class here: https://github.com/Firestorm-Graphics/CSRF-Protect