Custom page for incorrect entries

6 views
Skip to first unread message

Vivid

unread,
Jul 30, 2010, 10:21:33 AM7/30/10
to reCAPTCHA
Hi

I am new to .php and was wondering if anyone can tell me how to send
visitors to a custom error page when they incorrectly enter the
validation code. Currently they get a white screen with the message
"You have entered an invalid Validation Code. Please try again by
hitting the browser back button." I would like to send them to a page
called error.html.

Many thanks for your help!

Spectrum-Nashville.com

unread,
Jul 30, 2010, 5:18:35 PM7/30/10
to reCAPTCHA
The example code you're using probably has a simple echo() to send the
plain vanilla error message to the screen.

You can replace this with a header() call IF you haven't sent anything
else to the browser before the header().

You would do something like this:

header( "Location: error.html" );
exit();

Danny Pryor

unread,
Jul 30, 2010, 11:31:11 PM7/30/10
to reCAPTCHA
Greetings, Vivid. It's actually fairly easy, although for a newbie it
might look a bit daunting, when considering the task. While I'm not
going to help at this moment, I'll come back to this thread in the
morning (Saturday) and share some of the code I've created for the
websites I use. So long for now; and feel free to send a direct email
if you wish. TTYL - dtp

newbie

unread,
Jul 31, 2010, 5:51:38 PM7/31/10
to reCAPTCHA
Hi Danny,

it would be nice if you good tell the code ... I used the php-plugin
to install the captcha and want a custom error-site, too .. .but I
don't know how to get it working :-( tried with header - but it told
me there's already a header sent...

thanks for answer, newbie

Vivid

unread,
Aug 1, 2010, 8:11:49 AM8/1/10
to reCAPTCHA
This works perfectly. Thank you very much indeed!

On Jul 30, 10:18 pm, "Spectrum-Nashville.com"

Vivid

unread,
Aug 1, 2010, 8:14:23 AM8/1/10
to reCAPTCHA
Thank you Danny!

Danny Pryor

unread,
Aug 9, 2010, 1:21:33 AM8/9/10
to reCAPTCHA
Do you still want help, or did Spectrum-Nashville.com help you? I've
been terribly busy and haven't had a chance to get back with you. My
apologies. Let me know.

dtp
Reply all
Reply to author
Forward
0 new messages