Welcome Guest, Not a member yet? Register   Sign In
Trouble while Integrating Query in CI
#12

[eluser]Pascal Kriete[/eluser]
I have never the validation plugin so it's troubleshooting as we go along. The problem is that the remote validation is done using GET requests. So the first thing to do is to change the jQuery ajax call in the validation library to use POST. Then you want to change the controller accordingly:

Code:
function confirm_email( )
{
    $email = $this->input->post('email');
    $this->load->model('check_model');
    $valid_email = $this->check_model->check_email($email);
    echo $valid_email;
}

However, as per the documentation it can only receive true or false.

So we need another small change.
Code:
// ....
$this->load->model('check_model');
$valid_email = $this->check_model->check_email($email);
echo ($valid_email == 0) ? 'false' : 'true';

And that should cover most of the problems.


Messages In This Thread
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 12:28 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 12:48 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 01:13 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 02:04 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 03:16 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 03:32 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 11:54 AM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 12:45 PM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 02:01 PM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 02:14 PM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 02:23 PM
Trouble while Integrating Query in CI - by El Forum - 06-30-2008, 02:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB