Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP FormMail with CAPTCHA
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedASP FormMail with CAPTCHA

 Post Reply Post Reply
Author
cjpopp View Drop Down
Newbie
Newbie


Joined: 08 February 2003
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote cjpopp Quote  Post ReplyReply Direct Link To This Post Topic: ASP FormMail with CAPTCHA
    Posted: 11 October 2006 at 11:36pm
I'm using ASP FormMail and am tired of the spam I get, so I figured I would use CAPTCHA in conjunction with the ASP FormMail script.

I've installed everything but found that the form would process if the verification was typed in wrong or right.

I can not figure out at what page to place the following:



<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->           
              <%

'Above we include the file that checks to see if the security code is correct

'The variable 'blnCAPTCHAcodeCorrect' will be set to true if the security code is entered correctly

If blnCAPTCHAcodeCorrect Then
     
     Response.Write("Correctly")
Else

     Response.Write("Incorrectly")
End If
              
              
              
              
              %>


Should it be on the page that processes the form (the asp file) or should it be on the page that says thanks.
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: 12 October 2006 at 8:04am
This goes on the processing page, but after the code is enetered incorrectly you need to then stop the process form continuing, if you don't want any more code executed.

eg.

Response.Write("Incorrectly")
Response.End

Back to Top
cjpopp View Drop Down
Newbie
Newbie


Joined: 08 February 2003
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote cjpopp Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2006 at 10:13pm
I tried both of the following:

--------------------------------

     Response.Write("Correctly")
Else
     Response.Write("Incorrectly")
End If
Response.End

------------------------
     Response.Write("Correctly")
Else
     Response.Write("Incorrectly")
Response.End
------------------------

Both of those combinations did not work for me.

I've got it on the processing page with the code in the BODY area. Should it go above the </head>?
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: 13 October 2006 at 9:45am
It needs to go at the top of the page before any processing, that you don't want running if the security code is wrong.
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.