Confusion about order of procedures
Posted: Wed Jun 14, 2006 2:13 pm
I'm making some code to validate the format of an e-mail address and also a captcha check.
For some reason, with the e-mail format check left in the code, the captcha always returns false.
If I comment out the e-mail check, the captcha portion works properly.
I can post the modules if the info is needed.
Code: Select all
if ($username != "" || $fname != "" || $lname != "" || $email != "" || $password != "" || $vpassword != "" || $legaleagree != "") {
//captcha procedure
include "./captcha/audit.php";
//e-mail validation procedure
include "validate.php";
$failed = "no";
//e-mail check
if ($email != "") {
if (validate_email($email)) {
} else {
echo "<center><font color=red><b>Please type in a valid e-mail address</b></font></center>";
$failed = "yes";
}
}
//captcha check
if (audit() && $failed != "yes") {
} else {
echo "<center><font color=red><b>Please type in the correct text from the picture into the box below</b></font></cent$
$failed = "yes";
}If I comment out the e-mail check, the captcha portion works properly.
I can post the modules if the info is needed.