session_start(); ?> if(isset($_POST['submit']) && !empty($_POST['submit'])): if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])): //your site secret key $secret = '6LdhFvUfAAAAAEVV4LKpZXqD7TpWszUoa-eBBKHc'; //get verify response data $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']); $responseData = json_decode($verifyResponse); if($responseData->success): //contact form submission code $name = !empty($_POST['Nombre'])?$_POST['Nombre']:''; $email = !empty($_POST['Email'])?$_POST['Email']:''; $message = !empty($_POST['Consulta'])?$_POST['Consulta']:''; $to = 'Lgarciafer99@gmail.com'; //$to = 'webmaster@plateauno.com'; $subject = 'Nueva consulta desde indubike.com'; $htmlContent = "
Nombre: ".$name."
Email: ".$email."
Mensaje: ".$message."
"; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From:'.$name.' <'.$email.'>' . "\r\n"; //send email @mail($to,$subject,$htmlContent,$headers); $succMsg = 'Su mensaje fue enviado, gracias.'; else: $errMsg = 'Falla en capcha, porfavor intente nuevamente.'; endif; else: $errMsg = 'Porfavor haga click en captcha.'; endif; else: $errMsg = ''; $succMsg = ''; $name = ''; $email = ''; $message = ''; endif; ?>El Plumerillo 1003, Villa Centenario, Provincia de Buenos Aires