I have this function in my controller :
public function simpan() {
$this->load->library('form_validation');
// field name, error message, validation rules
$this->form_validation->set_rules('name', 'User Name', 'trim|required|min_length[4]|xss_clean');
$this->form_validation->set_rules('email', 'Your Email', 'trim|required|valid_email');
$this->form_validation->set_rules('message', 'Your Message', 'trim|required');
if ($this->form_validation->run() == FALSE) {
$data['msg_save'] = "data not saved";
$this->load->view("v_bukutamu, $data");
} else {
$this->m_bukutamu->simpan();
$data['msg_save'] = "data saved";
$this->load->view("v_bukutamu, $data");
}
}
And this line to parsing varible $msg_save in View :
<p><?php if (isset($msg_save)) echo $msg_save; ?></p>
The data was successful saved to database, but it's give me this error message :

I just want to show the successful or failed message with the same view. Does anyone have any idea what should I change in my script?