Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - variable page as redirect after captcha fail
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedvariable page as redirect after captcha fail

 Post Reply Post Reply
Author
Aliceerickson View Drop Down
Newbie
Newbie


Joined: 08 February 2011
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aliceerickson Quote  Post ReplyReply Direct Link To This Post Topic: variable page as redirect after captcha fail
    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?
 
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post 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 - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
Aliceerickson View Drop Down
Newbie
Newbie


Joined: 08 February 2011
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aliceerickson Quote  Post ReplyReply Direct Link To This Post 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
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.