An Error Was Encountered |
I wrote the below code for form validation. When a mandatory field is not entered then is shows proper message, but when I press F5 and resubmit my form then I get error "An Error Was Encountered - The action you have requested is not allowed.". How shall I remove this error? Below is my code. Thank you In advance
View: Code: <?php config/form_validation.php PHP Code: $config = array( Controller PHP Code: if ($this->form_validation->run('department') == FALSE)
Hi,
can you upload a thumb so that we can see how the error is displayed ?
NexoPOS 2.6.2 available on CodeCanyon.
Hi,
you should check the following config item: PHP Code: $config['csrf_regeneration'] = TRUE; modify it to FALSE may work. See more http://www.codeigniter.com/user_guide/li...rgery-csrf (06-06-2015, 11:25 AM)pdthinh Wrote: Hi, Kindly let me know is there any way where I can enable the CSRF_REGENERATION and the error will get resolved
The idea with CSRF is exactly for you not to resubmit the same form twice. The alternative solution would be to do a redirect (to the same controller/function if you want to return tot the form after submitted some data) after you saved the form data.
Website: http://avenir.ro
|
Welcome Guest, Not a member yet? Register Sign In |