title: Codeigniter avoid CRSF Attack
body: <p>I have tried two approaches:</p>
  
  <p>-- Using form_open :   With this approach, I am able to add a field with CSRF Token in request header as well as in cookies. But the same CSRF Token is generated every time and hence not able to prevent the attack.</p>
  
  <p><strong>Also I need to know apart from adding Token on client-side, is there any need to check it at server-side or it is automatically done.</strong></p>
  
  <p>-- Using hidden input field with custom form tags : With this, I added a random token as the input field, still not able to avoid the attack.</p>
  
  <p><strong>For second approach, I need to know the changes we need to do in Security.php file and for this also if we have to do any server-side check or not.</strong></p>