random answer captcha doesn't work
I have been using web assist captcha for a while with no problems but i have a particular site that i made some changes to and now the random answer doesn't validate properly?
If i answer the question correctly, the validation show if still shows?
thanks for your help,
Jim Balthrop
Validation Code
<?php require_once('WA_Globals/WA_Globals.php');?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php
if (isset($_POST["submit1"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_quoteform_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?strtolower($_SESSION["random_answer"]):"") . "",false,5);
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
$WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"quoteform");
}
}
?>
Form input code
<td><strong>Security Question:</strong>to prevent spam<br />
<label for="Security_code" >
<span class="style1"><?php require_once("WA_ValidationToolkit/WAVT_CaptchaSecurityQuestion.php"); ?></span>
</label>
<br />
<input name="Security_question" type="text" class="inputValue" id="Security_question" value="<?php echo(ValidatedField("quoteform","Security_question")) ?>" maxlength="40" />
<br />
<p class="style1">
<?php
if (ValidatedField('quoteform','quoteform')) {
if ((strpos((",".ValidatedField("quoteform","quoteform").","), "," . "5" . ",") !== false || "5" == "")) {
if (!(false)) {
?>
* Your answer was not correct.
<?php //WAFV_Conditional quote_form.php quoteform(5:)
}
}
}?>
</p>
<br />
</td>