CodeIgniter Forums

Full Version: CSRF AJAX REQUEST 403 Forbidden Error - Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello everyone 

Firstly ..
 I know English at a simple level So I'm sorry. Hope you can help me

I compared it with a mistake I could not solve

I want to do city {turkish = sehir} when the SelectBox changes, loading the bins into the other {ilcee} SelectBox

I am using Jquery Version = jquery-3.1.1.min.js

and application->config->config.php

$config['csrf_protection'] = TRUE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();

in this way..

and ajax request 

Ajax request script I am also doing view.php so I use javascript between php tags

echo '
           var key = "'.$this->security->get_csrf_hash().'";
           var name = "'.$this->security->get_csrf_token_name().'";

                $(".ilcee option").remove();





POST http://localhost/ajans/basvur/ilcedoldur 403 (Forbidden)
 XHR failed loading: POST "http://localhost/ajans/basvur/ilcedoldur".

can't solve help me please

also ilcedoldur.php

 public function ilcedoldur()

        if (isset($_POST)) {
                if (isset($_POST["il"]))