// if ($_POST['temp']=="si"){ // include("send-contacto.php"); // } $temp = isset($_POST['temp']) ? $_POST['temp'] : null ; if ($temp=="si"){ if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])){ //your site secret key $secret = '6LcQV4oUAAAAAGarJRiVy2lglIlwFo-ZcPatCgXy'; //get verify response data $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.urlencode($secret).'&response='.urlencode($_POST['g-recaptcha-response'])); $responseData = json_decode($verifyResponse); $name = !empty($_POST['name'])?$_POST['name']:''; $email = !empty($_POST['email'])?$_POST['email']:''; $message = !empty($_POST['message'])?$_POST['message']:''; if($responseData->success){ include ("send-contacto.php"); if ($envio) $succMsg = '
Puedes llamarme por teléfono o rellenar el formulario y te llamamos nosotros.