I believe that the ($codeVal) has to be installed somewhere with the else if (md5($code) == $_SESSION['image_random_value']) to facilitate setting of the error. Having difficulty making progress with this aspect of the validation!
Captcha control as follows from the validate.php:
PHP Code:
public function validateCode($codeVal, $codeName) {
if (strlen($codeVal) <= 0) {
$this->setError($codeName, "Enter Validate Code");
} else if (md5($code) == $_SESSION['image_random_value']) {
$this->setError($codeName, "Valid Code Required");
}
}
Captcha panel visible to visitor as follows from the contact.php: