<code lang="php">
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST['site'])) {$site = '<b>Сайт:</b> '.$_POST['site'];}
if (isset($_POST['geo'])) {$geo = '<b>Геграфия рекламы:</b> '.$_POST['geo'];}
if (isset($_POST['phone'])) {$phone = '<b>Телефон:</b> '.$_POST['phone'];}
if (isset($_POST['email'])) {$email = '<b>email:</b> '.$_POST['email'];}
if (isset($_POST['formData'])) {$formData = $_POST['formData'];}
$to = "mail@gmail.com";
$sendfrom = "mail@gmail.com";
$headers = "From: " . strip_tags($sendfrom) . "\r\n";
$headers .= "Reply-To: ". strip_tags($sendfrom) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html;charset=utf-8 \r\n";
$subject = "$formData";
$message = "$formData
$site
$geo
$email
$phone";
$send = mail ($to, $subject, $message, $headers);
if ($send == 'true')
{
echo '<center>
Спасибо за отправку вашего сообщения!
</center>';
}
else
{
echo '<center>
<b>Ошибка. Сообщение не отправлено!</b>
</center>';
}
} else {
http_response_code(403);
echo "Попробуйте еще раз";
}?>
</code>
<script defer src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script defer type="application/javascript" src="js/libs.min.js"></script>
<script defer type="application/javascript" src="js/js.js"></script>
expiryDate:new Date(2018, 0, 1, 9, 30)