Solucionar error: Notice: Undefined index: recaptcha_response_field in en recaptcha google

Sustituir la linea roja por la linea verde.
// THIS CODE SHOWS NOTICE MESSAGE

if ($_POST[‘recaptcha_response_field’]) {

        $response = recaptcha_check_answer(
$privatekey, $_SERVER[‘REMOTE_ADDR’],
$_POST[‘recaptcha_challenge_field’],
$_POST[‘recaptcha_response_field’]
);

// THIS CODE DOES NOT SHOW NOTICE MESSAGE

if (isset($_POST[‘recaptcha_response_field’])) {
$response = recaptcha_check_answer(
$privatekey, $_SERVER[‘REMOTE_ADDR’],
$_POST[‘recaptcha_challenge_field’],
$_POST[‘recaptcha_response_field’]
);

—————————————————————–

1)   if ($_POST[‘recaptcha_response_field’])   tests if the field is
equal to 1 (true).

2)   if (isset($_POST[‘recaptcha_response_field’]))     tests if the
field has been set (defined).

I believe you would only use 1) as an IF condition if you expect the
condition to be TRUE or FALSE. Whereas 2) tests whether the variable
has been set, which is what you actually want to test, because if it’s
set this means the form has been submitted and if it’s not set
(undefined) then you want to display the reCAPTCHA.

Fuente: https://groups.google.com/forum/#!msg/recaptcha/mNzwd6sd2nY/ZgyBaF38UUkJ