The action you have requested is not allowed. Codeigniter

Check your config.php If,

$config['csrf_protection'] = TRUE;

If it is set to true you need to use form_open(), this will auto append the ci_csrf_token. Otherwise you can just set to FALSE.

But its advisable to set it to TRUE. But you need to make sure all your request includes the ci_csrf_token including AJAX request.

https://www.codeigniter.com/user_guide/helpers/form_helper.html


Try this

<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>">