I am making country state and city drop down with the help of ajax in our codeigniter frame work .
The structure of database given bellow.
Country
function get_cities($Country){ $this->load->model('city_model'); header('Content-Type: application/x-json; charset=utf-8'); echo(json_encode($this->cities_model->get_cities($dealCountry))); }
In this function, you put incorrect variable name $dealCountry.