Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASPProtect Version 8.x Support
 CJWSoft Support Info : ASPProtect Version 8.x Support
Subject Info: Using Captcha on login_form_inc A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
pgplast
New User
New User


Joined: January/10/2007
Location: United States
Online Status: Offline
Info: 30
Added: January/20/2010 at 1:57pm | IP Logged Quote pgplast

I would like to have a CAPTCHA on the login form that appears when a user goes to a particular protected page. The form comes from the include of /scripts/login_form_inc.asp.
I added <!--#include file = "captcha/create_captcha_inc.asp"--> to the markup in the form on login_form_inc.asp and the CAPTCHA draws correctly when a page is called. However, it is not clear to me how to actually make it work when the form is submitted. Can you give direction,.... or this this too custom an issue?
Thanks.
Back to Top View pgplast's Profile Search for other info by pgplast
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1729
Added: January/20/2010 at 2:08pm | IP Logged Quote cwilliams

That's an interesting one actually.. I'm thinking that the captcha checking code that would usuaully go into the page the form submits too will need to go into the checks that happen in... 'check_user_inc.asp'..

In a slighty modified form as to go with the flow of everything already in ''check_user_inc.asp''.. soon as I get chance I'll try to get it working.. but in the meantime if you're clever I bet you can sort it out based on what I just told ya..



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
pgplast
New User
New User


Joined: January/10/2007
Location: United States
Online Status: Offline
Info: 30
Added: January/24/2010 at 12:52pm | IP Logged Quote pgplast

Thanks Chris. I followed your advice and find that adding the following to check_user_inc.asp works. (I put it just after you create the value for ThisPage)

---------
'''captcha
If Status = "Checkem" then
     
ToCheck = LCase(Request("ToCheck"))
If Session("CAPTCHA") <> "" And ToCheck = Session("CAPTCHA") Then
else
     ErrorMessage = ErrorMessage & Server.URLEncode("You did not type in the verification info correctly.\n\n")
End If
     
If ErrorMessage <> "" Then
     Response.Redirect "patient.asp?" & Request.Form & "&ErrorMessage=" & ErrorMessage
     Response.End
End If

end if

'''end captcha

-----------------------
I saved this in a special version of the page I call check_patient_user_inc.asp, which is used to authenticate folks specifically trying to enter the "patient.asp" page.

This is not the most elegant solution, but works for now. However, I would sure like to see what I am sure would be your much better idea on this.
Thanks.
----------
Back to Top View pgplast's Profile Search for other info by pgplast
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com