Adding the Captcha form protection to your customer registration form (VP-ASP 7.00)

Adding the Captcha form protection to your customer registration form (VP-ASP 7.00)

You can add more security to your customer registration form so that robot cannot keep adding new customer to your database.

This can be done by adding the Captcha form protection to your customer registration form.

To display the captcha protection to the customer registration form, please follow these steps :

1. Open shopcustregister.asp using text editor (eg. Notepad).

2. Locate the following code:
(around line 122 or so)

ShopCustomerForm


3. Below that code, add the following code:

HtmlWrite "<div class=""comment_text"">"
HtmlWrite "*" & getlang("langcaptchaenter")
getCAPTCHA
HtmlWrite "</Div>"


4. Locate the following code:
(around line 180 or so)

ValidateUsername strcustuserid, serror, rc


5. Below that code, add the following code:

dim blnCAPTCHAcodeCorrect2
if GetConfig("xprotectemailforms") = "Yes" then
if lcase(getconfig("xcaptchamethod")) = "recaptcha" then
blnCAPTCHAcodeCorrect2 = recaptcha_confirm(request.Form("recaptcha_challenge_field"), request.Form("recaptcha_response_field"))
if lcase(blnCAPTCHAcodeCorrect2) = "correct" then
'Fine
else
SError = SError & GetLang("langcaptchawrong") & "<br />"
end if
else
'700 - 2010.07.05 - Enhancement: To have own captcha set for tell a friend frame
%><!-- #include file="captcha/CAPTCHA_process_form.asp" --><%
if blnCAPTCHAcodeCorrect then
'Fine
else
sError = sError & getlang("langcaptchawrong") & "<br />"
end if
end if
End If

6. Save the file and check your website to see the changes.


Times Viewed:
7930
Added By:
Wilson Keneshiro
Date Created:
9/8/2011
Last Updated:
10/25/2011