Código PHP:
function userAddRes(){
// set common properties
$data['title'] = 'Exito';
$this->set_rules();
if ($this->form_validation->run() == FALSE)
{
$data['title'] = 'Agregar Nuevo Usuario';
$data['action'] = site_url('user/userAddRes');
$this->load->view('userAdd', $data);
}
else {
// save data
$user = array('codigoPucp' => $this->input->post('codigoPucp'),
'nombre' => $this->input->post('nombre'),
'apellidos' => $this->input->post('apellidos'),
'emailPucp' => $this->input->post('emailPucp'),
'sexo' => $this->input->post('sexo'),
'usuario' => $this->input->post('usuario'),
'password' => $this->input->post('password'),
'telefono' => $this->input->post('telefono'),
'mostrarTelefono' => $this->input->post('mostrarTelefono')
);
$id = $this->userModel->save($user);
//load exito
$this->load->view('userExito', $data);
}
}
Me gustaria saber como puedo solucionar eso