I have a registration form. after success i want to remove set_value
value and unset all posted value.
view.php
You can refresh page on success :
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');
if ($this->form_validation->run() == FALSE){
$data['msg']='Please fill all field';
}else{
$data['msg']='success';
redirect($_SERVER['REQUEST_URI'], 'refresh');
}
$this->load->view('view',$data);