Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function _add_comment()
- {
- if ($this->input->post('submit_comment'))
- {
- $comment = array(
- 'class' => $this->input->post('class'),
- 'parent_id' => $this->input->post('parent_id'),
- 'title' => $this->input->post('title'),
- 'text' => $this->input->post('text'),
- );
- $this->load->model('comments/commentus_form_m');
- var_dump($this->commentus_form_m->is_valid($comment));
- die();
- if ($this->commentus_form_m->is_valid($comment))
- {
- die('Valid!');
- $this->load->model('comments/commentus_m');
- $this->commentus_m->insert($comment);
- }
- else
- {
- echo validation_errors();
- print_r($comment);
- die('Not valid');
- }
- }
- }
Add Comment
Please, Sign In to add comment