Welcome Guest, Not a member yet? Register   Sign In
callback - looping or happening twice! Please help!!!
#1

[eluser]nevsie[/eluser]
I am running the callback and originally it was sending an mail which started arriving twice. Simplfying it down... it appears to only be occuring through the callback i am making... not sure why, but hopefully someone can spot the obvious i am missing!!!

Code:
function forgotten()
    {
        $this->load->library('validation');
        
        $fields = array('email' => 'Email Address');
        $this->validation->set_fields($fields);
        
        $rules = array('email' => 'required|callback_email');
        $this->validation->set_rules($rules);
        
        $this->validation->set_error_delimiters('<div class="error">', '</div>');
        
        if ($this->validation->run() == FALSE)
        {
            $this->load->view('login/forgotten');
        }
        else if ($this->validation->run() == TRUE)
        {
            $this->session->set_flashdata('message', 'success and redirected');
            redirect('login/login');
        }
        
    }
#2

[eluser]nevsie[/eluser]
sorry being a spanner!!! i am running and if and else if, therefore doing the validation twice and i did not see it... fool...
#3

[eluser]wiredesignz[/eluser]
Having a spanner in the forums is better than all the loose nuts we normally get. :lol:




Theme © iAndrew 2016 - Forum software by © MyBB