Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - CAPTCHA Help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedCAPTCHA Help

 Post Reply Post Reply
Author
axess View Drop Down
Newbie
Newbie


Joined: 10 July 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote axess Quote  Post ReplyReply Direct Link To This Post Topic: CAPTCHA Help
    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")
%>
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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")

Back to Top
axess View Drop Down
Newbie
Newbie


Joined: 10 July 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote axess Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.