Print Page | Close Window

CAPTCHA Help

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz CAPTCHA
Forum Description: Support forum for the Web Wiz CAPTCHA security image.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20625
Printed Date: 28 March 2026 at 3:25pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: CAPTCHA Help
Posted By: axess
Subject: CAPTCHA Help
Date Posted: 10 July 2006 at 10:03pm
I have two forms, CAPTCHA works on one, but not on the other, can anyone help ?

Below is a copy of my form processor ASP that I'm not able to get working with CAPTCHA.

I know this;

<!-- Include file for CAPTCHA form processing -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->

is supposed to go at the top of the file...

What I can't figure out is where to insert this;

if blnCAPTCHAcodeCorrect = false then
  Response.Redirect ("msgcode.html")
else
end if

so that if the security code entered is wrong, the user gets redirected and if it's correct the ASP process does what it's supposed to.

Thanks in advance, Mario.

<%
Server.ScriptTimeOut = 360
%>

<%
Set Upload = Server.CreateObject("Persits.Upload.1")
' Upload files
Upload.SetMaxSize 2097152 ' Truncate files above 2MB
Upload.SaveVirtual "/cgi-bin/uploads"
Set JMail = Server.CreateObject( "JMail.SMTPMail")
JMail.ServerAddress = "mail.mydomain.com:25"
JMail.Sender = "me@mydomain.com"
JMail.Subject = "User Rig Pix (www)"
JMail.AddRecipient("me@mydomain.com")
For Each File in Upload.Files
JMail.AddAttachment( "e:\\inetpub\\clients\\mydomain.com\\cgi-bin\\uploads\\" & File.ExtractFileName )
Next
message = ""
For Each Item in Upload.Form
message = message & Item.Name & " = " & Item.Value & VBCrLf
Next
JMail.Body = message
JMail.Execute()
Set Jmail = Nothing
Set Upload = Nothing
Response.Redirect ("msgupload.html")
%>



Replies:
Posted By: WebWiz-Bruce
Date Posted: 11 July 2006 at 7:58am
Enter the following at the top, in this order:-

<!-- Include file for CAPTCHA form processing -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->

If blnCAPTCHAcodeCorrect = False Then Response.Redirect("msgcode.html")



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: axess
Date Posted: 11 July 2006 at 11:42am
Thanks,  unfortunately it still doesn't work.

The user is always redirected to "msgcode.html" whether the correct code, or not, is entered.

I looked at my two forms in detail and they contain a lot of the same elements, but the one that doesn;t work contains;

enctype="multipart/form-data"

in the <FORM> tag. Is it possible that this is causing the problem. I tried removing it from my form to test, but then I get a different error once the "submit" button is pressed.


Posted By: WebWiz-Bruce
Date Posted: 11 July 2006 at 1:01pm
If you are using :-

enctype="multipart/form-data"

Then you can't get the form data in the normal way, so the CAPTCHA include would not work.

You would need to get the form element through the upload component used instead, which is more tricky. Have a look at the Persists site for how you would read in other form elements.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net