close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

random answer captcha doesn't work

Thread began 7/26/2010 11:52 am by JBWebWorks | Last modified 7/26/2010 3:19 pm by Jason Byrnes | 837 views | 2 replies |

JBWebWorks

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>

Sign in to reply to this post

JBWebWorks

Never mind my post.

I got it working. I had made some mistake in loading the validation files

Sign in to reply to this post

Jason ByrnesWebAssist

OK, glad to hear this is working.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...