<?php
//echo "<pre>"; print_r($_POST)  ;  echo "</pre>".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; 

//$sender_name = stripslashes($_POST["sender_name"]);  6LdQ03IUAAAAADlDxIgX1irVcTfh0IaVjnTVJamT
	$sender_email = stripslashes($_POST["email"]);
	$form_result = stripslashes($_POST["form_result"]); 
	$form_result_description = stripslashes($_POST["form_result_description"]); 
?>

 
<html>
<head>
 
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<style>

.loader {
	 position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 2rem solid #f3f3f3;
  border-radius: 50%;
  border-top: 2rem solid #3498db;
  width: 15rem;
  height: 15rem;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
}
@media   (orientation: landscape) {
	.loader { 
  width: 50vh;
  height: 50vh; 
}
}

@media   (orientation: portrait) {
		.loader { 
  width: 50vw;
  height: 50vw; 
}
}


/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
</style>
</head>
<body>

<div class="loader"></div>

<script type="text/javascript">
  var onSubmit = function(response) {
    document.getElementById("simpleForm").submit(); // send response to your backend service
  };
</script>



<form id="simpleForm" action="mail.php" method="POST" style="display:none">
 <input type="hidden"   value="<?php echo $sender_email; ?>" name="email"/>
 <input type="hidden"   value="<?php echo $form_result; ?>" name="form_result"/>
 <input type="hidden"   value="<?php echo $form_result_description; ?>" name="form_result_description"/>
  <button   id="submit_button" class="g-recaptcha" data-sitekey="6LdQ03IUAAAAADlDxIgX1irVcTfh0IaVjnTVJamT" data-callback="onSubmit">Submit</button>
</form>


    <script>
	window.onload = function() { 
    document.getElementById("submit_button").click();
};
	</script>
</body>
</html>