I want to make reload page after submitting data, but I got some problem with that, i've tried several ways but it doesn't work. here's my code :
public function prosesTambah() {
$this->form_validation->set_rules('tgl_date', 'Date', 'trim|required');
$data = $this->input->post();
if ($this->form_validation->run() == TRUE) {
$result = $this->M_posisi->insert($data);
if ($result > 0) {
$out['status'] = '';
$out['msg'] = show_succ_msg('Add Success!', '20px');
} else {
$out['status'] = '';
$out['msg'] = show_err_msg('Add Failed!', '20px');
}
} else {
$out['status'] = 'form';
$out['msg'] = show_err_msg(validation_errors());
}
echo json_encode($out);
}
Aucun commentaire:
Enregistrer un commentaire