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

[eluser]Shahgeb[/eluser]
I need help:
my question is.
i am making a form that client takes signup on site. but client enter the email address, It might be that email address is already exist in db. how i can code this activity,
i am student and working on it last 10 hours but still facing problem plz help me
thanks again

you ppl can your own code just a simple example for email duplication.

Best Regard
Amjad Farooq
#2

[eluser]Kemik[/eluser]
This is the wrong forum.

You just need to make a callback and use that in the validation of the field.
#3

[eluser]Michael Wales[/eluser]
This isn't a complete example, just the parts that matter

Code:
$rules['email'] = 'required|valid_email|callback__check_email';
$this->validation->set_rules($rules);

function _check_email($email) {
  $query = $this->db->get_where('users', array('email'=>$email), 1, 0);
  if ($query->num_rows() != 0) {
    $this->validation->set_message('_check_email', 'That email address has already been registered.');
    return FALSE;
  }
  return TRUE;
}

Should be enough to get you on your way.
#4

[eluser]Shahgeb[/eluser]
boundle of thanks i have made it possible with your guidence. thanks again




Theme © iAndrew 2016 - Forum software by © MyBB