Welcome Guest, Not a member yet? Register   Sign In
Callbacks
#3

[eluser]aeternuslibertas[/eluser]
awesome thanks!
before i stumbled upon how to correctly check for duplicate emails, i was using this code, that i wrote, and it wasn't working... i spent hours on it, can u see something that i was missing?

Code:
function check_duplicate_email($email){
        $continue_registration='';
        $q = $this->db->get('realtors');
        
        if($q->num_rows() > 0 ){
            foreach ($q->result() as $row){
                if($email == $row->email){
                    
                    $continue_registration=FALSE;
                    //if $email=$row there is already an exact same email in the system
                    //so this means we stop the registration process
                
                }//end email if
                else if($email!=$row->email){
                    
                    $continue_registration=TRUE;
                    //this line returns true, because the submitted email, does not match an email in the system
                }
            }//end foreach
        }//end if
        return $continue_registration;
    }//end check_duplicate_email


Messages In This Thread
Callbacks - by El Forum - 06-09-2011, 04:36 PM
Callbacks - by El Forum - 06-09-2011, 07:09 PM
Callbacks - by El Forum - 06-09-2011, 08:30 PM
Callbacks - by El Forum - 06-09-2011, 11:01 PM
Callbacks - by El Forum - 06-12-2011, 05:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB