Jnr PHP/Codeigniter Developer Question:

Download Job Interview Questions and Answers PDF

Tell me how you can enable CSRF (Cross Site Request Forgery) in CodeIgniter?

Jnr PHP/Codeigniter Developer Interview Question
Jnr PHP/Codeigniter Developer Interview Question

Answer:

You can activate CSRF (Cross Site Request Forgery) protection in CodeIgniter by operating your application/config/config.php file and setting it to

$config [ ‘csrf_protection’] = TRUE;

If you avail the form helper, the form_open() function will insert a hidden csrf field in your forms automatically

Download Jnr PHP/Codeigniter Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is inhibitor in CodeIgniter?Do you know how can you enable error reporting in PHP?