Edit file File name : Core_team.php Content :<?php class Core_team extends CI_Controller{ public function index(){ $this->load->view('header'); $this->load->model('Core_model'); $data=$this->Core_model->get_team(); $this->load->view('manage_core_team',["test"=>$data]); $this->load->view('footer'); } public function add_team(){ $this->load->view('header'); $this->load->view('add_core_team'); $this->load->view('footer'); } public function add(){ $name=$this->input->post('name'); $email=$this->input->post('email'); $designation=$this->input->post('designation'); //$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('Core_model'); $id=$this->Core_model->add_team($name,$email,$designation,$file,$updated_by); redirect('Core_team/'); }else{ echo "Could not upload file"; } } public function signout(){ session_destroy(); redirect('/User_login'); } public function logout(){ session_destroy(); redirect('/User_login'); } } ?> Save