function edit() { if (isset($_POST['save'])) { $id = $this->input->post('id'); $data = array('page_title' => trim($this->input->post('page_title')), 'site_title' => trim($this->input->post('site_title')), 'metadesc' => trim($this->input->post('metadesc')), 'metakey' => trim($this->input->post('metakey')), 'created_date' => date('y:m:d h:m:s'), 'state' => 1); $dataIn = $this->crud_model->updateData('seopage', 'id', $id, $data); if ($dataIn) { $this->admintemp->write('message', 'Edited Successfully'); redirect('seo'); } else { $this->admintemp->write('message', 'Error occured while editing'); Seo::index(); } } else { Seo::_edit(); } }