View file File name : Add_aminity.php Content :<?php class Add_aminity extends CI_Controller{ public function index(){ $this->load->model('Add_aminity_model'); $data=$this->Add_aminity_model->get_aminities(); $this->load->view('Add_aminity_list',["test"=>$data]); redirect('Add_aminity/create_aminity'); } public function create_aminity(){ $this->load->view('header'); $this->load->model('Addminity_model'); $data=$this->Addminity_model->getusers(); $this->load->model('Properties_model'); $prt=$this->Properties_model->get_properties(); $this->load->view('Add_aminity_form',['prt'=>$prt,'data'=>$data]); $this->load->view('footer'); } public function add_amminity(){ $properties=$this->input->post('properties'); $aminities=$this->input->post('aminities'); $this->load->model('Add_aminity_model'); $id=$this->Add_aminity_model->add_aminity($properties,$aminities); redirect('Properties/manage_properties'); } public function signout(){ session_destroy(); redirect('/User_login'); } public function logout(){ session_destroy(); redirect('/User_login'); } } ?>