I just paste the data into the codeigniter controller part in pastebin http://pastebin.com/KBtqrAkZ
public function add_product() { $this->lang->load('log_in', 'english'); log_in_check($this->lang->line('log_in_authentication_error'), 'admin/log_in'); $this->lang->load('common', 'english'); $data['title'] = $this->lang->line('admin_index_title'); $this->load->view('admin_template/header', $data); $this->load->view('admin_template/left_menu'); $data['error_msg'] = ''; if ($this->form_validation->run('add_product') === TRUE) { $this->admin_model->add_product($this->input->post()); $this->session->set_flashdata('status_msg', $this->lang->line('add_product_success')); redirect(uri_string(), 'refresh'); exit ; $data['error_msg'] = $this->lang->line('add_product_invalid_data'); } $this->load->view('admin/add_product');
Than my model is partially added to pastebin http://pastebin.com/WiLHV2sr
public function add_product($data = array()) { $this->db->insert('ishop_product', $data); return $this->db->insert_id(); }
my problem is after redirecting if I press ctrl + F5 or F5 than the data is pasting. I am new to coderiger. Help me please. Any help would be greatly appreciated.
source share