validation false, although the data is filled
I have form validation like this :
function insert() {
$this->form_validation->set_message('required', '*column must be
filled');
$this->form_validation->set_rules('judul', 'Judul', 'required');
$this->form_validation->set_rules('isi', 'Isi', 'required');
if ($this->form_validation->run() == FALSE) {
$this->layout->addJs('ckeditor/ckeditor.js');
$this->layout->addJs('js/admin/b267648789c30a07b0efa5bce7bdd9fe.js');
$this->layout->view('admin/admin_view/insertAdmin_view');
} else {
$data = array(
'title' => $this->input->post('judul'),
'content' => $this->input->post('isi'),
);
$this->db->insert('newses', $data);
... other proses ...
}
}
although I filled the data in form add data (I use ckeditor for adding
data), condition always false so it's not adding data that I want. but
it's got error 'if I add some html data, but if I add normal data text
it's work well'. once again when I running my program in localhost xampp
it's all work but when I use hosting that happen. any suggest ? thank you
for all advice.
No comments:
Post a Comment