Challenge Field Data

12 views
Skip to first unread message

Donald Grothoff

unread,
Nov 10, 2009, 12:41:16 PM11/10/09
to reCAPTCHA
I just got the recaptcha working but on my emails sent to me I see all
of the data strings in the challenge field. Is there a way to stop
that from showing all that gobbledy gook?

Charles Sweeney

unread,
Nov 11, 2009, 5:38:36 PM11/11/09
to reCAPTCHA
This is an issue for the script/code that handles the form data AFTER
reCAPTCHA has done its job.

Depends how your script is written. You can unset the challenge field
after reCAPTCHA is finished with it. Something like this:

unset($_POST['recaptcha_challenge_field']);

unset($_POST['recaptcha_response_field']);

That's the gist of it.

If you have a problem with notices being reported (as discussed in
another thread) you could do this:

if(isset($_POST['recaptcha_challenge_field'])){unset($_POST
['recaptcha_challenge_field']);}

if(isset($_POST['recaptcha_response_field'])){unset($_POST
['recaptcha_response_field']);}

I should stress, it depends on how your code is written. For example,
your script might put all the submitted data into another variable/
array and retrieve it from there later to send in the email, in which
case, the above code wouldn't work.

--
Charles Sweeney
http://FormToEmail.com
PHP mail script with reCAPTCHA
Reply all
Reply to author
Forward
0 new messages