What I must do to add "CSFR prevention field" to my forms? |
[eluser]frankabel[/eluser]
Hi, In User Guide one can read Quote:The first function is provided by the form helper and renders the form element and adds extra functionality, like adding a hidden CSFR prevention field. The latter is used to report errors related to form validation. at http://ellislab.com/codeigniter/user-gui...items.html My question is, what I must do to get the cited "CSFR prevention field" to my form? I uses "form_open()" function but not attribute or field is added to my form. Thanks in advanced Frank
[eluser]daparky[/eluser]
You can enable csrf protection by opening your application/config/config.php file and setting this: $config['csrf_protection'] = TRUE; If you use the form helper the form_open() function will automatically insert a hidden csrf field in your forms.
[eluser]skunkbad[/eluser]
If you plan to use ajax, you will need to get the value of that token and send it along with your ajax request.
|
Welcome Guest, Not a member yet? Register Sign In |