Welcome Guest, Not a member yet? Register   Sign In
callback problem
#1

[eluser]fuji2009[/eluser]
Hi i have a problem with callback function :

Code:
function check_infos()
    {
        extract($_POST);
        if (!empty($info))
            {
                $this->db->select('*');
                $this->db->from('loris');
                $this->db->where('email', $info);
                $this->db->where('user1_id', $user_login_id);
                $this->db->where('user2_id', $user_id);
                $query = $this->db->get();
                if($query->num_rows() > 0)
                    {
                        $this->form_validation->set_message('check_infos', 'Already exist');
                        return false;
                    }
                    else
                    {
                        return true;
                    }
            }
    }

Request :

SELECT * FROM (`loris`) WHERE `email` = '[email protected]' AND `user1_id` = '2' AND `user2_id` = '5'


The request is good but, the callback dont work

Can you help me ?

in my controller i have this :

Code:
$this->form_validation->set_rules('info','info','callback_check_infos|trim|required|xss_clean');

        if ($this->form_validation->run())
        {
.......................................
}



Thanks you


Messages In This Thread
callback problem - by El Forum - 01-18-2011, 09:52 AM
callback problem - by El Forum - 01-18-2011, 09:58 AM
callback problem - by El Forum - 01-18-2011, 10:24 AM
callback problem - by El Forum - 01-18-2011, 10:34 AM
callback problem - by El Forum - 01-18-2011, 10:44 AM
callback problem - by El Forum - 01-18-2011, 12:55 PM
callback problem - by El Forum - 01-18-2011, 12:59 PM
callback problem - by El Forum - 01-18-2011, 01:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB