Print Page | Close Window

variable page as redirect after captcha fail

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=29115
Printed Date: 28 March 2026 at 3:12pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: variable page as redirect after captcha fail
Posted By: Aliceerickson
Subject: variable page as redirect after captcha fail
Date Posted: 08 February 2011 at 6:40pm
I'm trying this out on localhost, with the aim of purchasing it for a production site. I need to have the redirect page be different for different parts of the site.
 
I found a topic on this, dating back to 2007, where somebody wanted to set up variable pages as the redirect after captcha fail.  I followed the directions on that, and I've had partial success. By "partial success" I mean that I've got the variable page redirection set up, but now the captcha image doesn't show.
 
In this code, the basic code, with my variable setup commented out, the captcha image shows up just fine:
 
'Dim myvariablepage
'myvariablepage = "loginform.asp?message=1&username="&username&"&password="&thispass
'strIncorrectCAPTCHApage = myvariablepage
Const strIncorrectCAPTCHApage = "loginform.asp?message=1"
 
But when I comment out the original to enable the variable page setup, the captcha image is broken:
 
Dim myvariablepage
myvariablepage = "loginform.asp?message=1&username="&username&"&password="&thispass
strIncorrectCAPTCHApage = myvariablepage
'Const strIncorrectCAPTCHApage = "loginform.asp?message=1"
I can toggle this back and forth, and the results are the same. What am I doing wrong here? Any help?
 



Replies:
Posted By: Scotty32
Date Posted: 08 February 2011 at 8:46pm
try doing:

Dim strIncorrectCAPTCHApage
strIncorrectCAPTCHApage = myvariablepage


Also, you can view the captcha image direct to see if there are any errors. Right click on the (missing) image and then "Properties"/"View Image Info" (depending on your browser) to get the URL.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Aliceerickson
Date Posted: 08 February 2011 at 9:20pm
This pointed me in the right direction, so thanks much! I needed to move all my variable definitions into the captcha config file instead of having them in the form processor page.
 
The below works fine for me for the two cases I've set up, and I include it here in case it might help somebody else. For the login form, I'm echoing back whatever the user filled in, since it's small. Not sure what I'll do with the contact form.
 
Dim myvariablepage, username, thispass, strIncorrectCAPTCHApage, whatkind
' whatkind sets up the different variable pages and comes from a hidden form field
whatkind = Request.Form("whatkind")
strIncorrectCAPTCHApage = myvariablepage
If whatkind = "loginform" then ' back to the login form
username = Request.Form("username")
thispass = Request.Form("password")
myvariablepage = "loginform.asp?message=1&username="&username&"&password="&thispass
ElseIf whatkind = "contactform" then ' back to the contact form
myvariablepage = "contactform.asp?message=2"
End if
strIncorrectCAPTCHApage = myvariablepage



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