Welcome Guest, Not a member yet? Register   Sign In
Flashdata not being returned properly problem!
#2

[eluser]OES[/eluser]
Hi.

Cant see the reason why you are storing flashdata in all your code. Its not like you are redirecting after form fail. But you did miss out on adding the array name on success.

Have a look at the below.

Code:
if ($this->validation->run() == false) {

  $data['error_text'] =   $this->validation->error_string;
  $this->load->view('login_view', $data);
        
} else {
  
  if($this->simplelogin->login($this->input->post('username'), $this->input->post('password')))
  {  
    $flashdata = array('success' => true, 'success_text' => 'Login Successful!');
    $this->session->set_flashdata('success', $flashdata);
    redirect('');
  }else{
    $data['error_text'] = array('error' => true, 'error_text' => 'There was a problem logging into the account.');
    $this->load->view('login_view', $data);  
  }
}

Hope this helps.


Messages In This Thread
Flashdata not being returned properly problem! - by El Forum - 11-06-2008, 03:48 PM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 03:10 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 03:28 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 03:57 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 03:59 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 04:02 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 04:06 AM
Flashdata not being returned properly problem! - by El Forum - 11-07-2008, 08:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB