I'm no PHP expert and now I think I've reached my limit
I've made a registration form and I think the confirmation email field is causing me problems as I get the error message "Email address fields do not match!" upon form submission.
Well, the email addresses in 'email' and 'emailconf' do match so there must be a problem with the code, the text fields are here:
Code: Select all
echo "<tr><td>E-Mail</td><td><input type=\"text\" name=\"email\"></td></tr>\n";
echo "<tr><td>Confirm E-Mail</td><td><input type=\"text\" name=\"emailconf\"></td></tr>\n";Code: Select all
$email2 = protect($_POST['emailconf']);Code: Select all
if(!$email){
$errors[] = "E-mail is not defined!";
}
if($password){
if(!$emailconf){
$errors[] = "Confirmation email is not defined!";
}
}Code: Select all
if($email && $emailconf){
if($password != $emailconf){
$errors[] = "Email address fields do not match!";
}
}Mike