tippytarka
Programmer
can you see anything wrong in my code?
the first 'if' works and the second 'else if' works, but the third 'else' just seems to output the first 'if'... this is confusing me???
the first 'if' works and the second 'else if' works, but the third 'else' just seems to output the first 'if'... this is confusing me???
Code:
function email_verify($email_database,$email_input) {
if ($email_database == "") {
$email_none ="please register";
return $email_none;
} else if ($email_database == $email_input) {
$email_taken ='email already registered';
return $email_taken;
} else {
echo 'thank you';
}
}
$email_database = $row['email'];
$email_input = $email;
$email_print = email_verify($email_database,$email_input);