PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- public function savePost()
- {
- $this->load->library('Translit');
- 'id' => $this->input->post('id'),
- 'cid' => $this->input->post('cid'),
- 'title' => $this->input->post('title'),
- 'description' => $this->input->post('description'),
- 'url' => $this->translit->transliter($this->input->post('title')),
- 'is_published' => $this->input->post('is_published'),
- );
- $this->load->library('Translit');
- //var_dump($post);die();
- {
- if ('' == $this->input->post('id'))
- {
- $this->db->insert('posts', $post);
- } else {
- }
- redirect("admin/"); //пока выводит просто в админку
- }
- }