Edit file File name : Bank.php Content :<?php class Bank extends CI_Controller{ public function manage_bank(){ $this->load->view('header'); $this->load->model('Bank_model'); $data=$this->Bank_model->get_bank(); $this->load->view('Bank_list',["test"=>$data]); $this->load->view('footer'); } public function create_comparision(){ $this->load->view('header'); $this->load->model('Bank_model'); $data=$this->Bank_model->get_bank(); $this->load->view('create_interest_comp',['data'=>$data]); $this->load->view('footer'); } public function comparision(){ $this->load->view('header'); $this->load->model('Bank_model'); $data=$this->Bank_model->get_comparision(); $this->load->view('manage_interest_comp',['data'=>$data]); $this->load->view('footer'); } public function add_int_comp(){ $bank_name = $this->input->post('bank_name'); $service = $this->input->post('service'); $pfee = $this->input->post('pfee'); $rate = $this->input->post('rate'); $this->load->model('Bank_model'); $this->Bank_model->add_comparision($bank_name,$service,$pfee,$rate); redirect('Bank/Comparision'); } public function create_bank(){ $this->load->view('header'); $this->load->view('Create_bank_form'); $this->load->view('footer'); } public function add_bank(){ $bank_name=$this->input->post('bank_name'); //$image=$this->input->post('image'); $file=$_FILES['image']['name']; $file_size=$_FILES['image']['size']; $file_tmp=$_FILES['image']['tmp_name']; $file_type=$_FILES['image']['type']; if(move_uploaded_file($file_tmp,"assets/upload-images/".$file)){ $file=base_url().'assets/upload-images/'.$file; $updated_by=$this->input->post('updated_by'); $this->load->model('Bank_model'); $id=$this->Bank_model->add_bank($bank_name,$file,$updated_by); redirect('Bank/manage_bank'); }else{ echo "Could not upload file"; } } public function signout(){ session_destroy(); redirect('/User_login'); } public function logout(){ session_destroy(); redirect('/User_login'); } } ?> Save