if (isset($_POST['contact_name'])) {$contact_name = $_POST['contact_name'];}
if (isset($_POST['contact_tel'])) {$contact_tel = $_POST['contact_tel'];}
if (isset($_POST['contact_email'])) {$contact_email = $_POST['contact_email'];}
if (isset($_POST['contact_type'])) {$contact_type = $_POST['contact_type'];}
if (isset($_POST['contact_goods'])) {$contact_goods = $_POST['contact_goods'];}
if (isset($_POST['contact_date'])) {$contact_date = $_POST['contact_date'];}
if (isset($_POST['contact_address'])) {$contact_address = $_POST['contact_address'];}
if (check('contact_type') || check('contact_goods') || check('contact_date') || check('contact_address')) {
$address = "mail@mail.mail";
$mes = "Тема: Заказ с сайта!\nТелефон: $contact_tel\nИмя: $contact_name\nПочта: $contact_email\nТип:
$contact_type\nТовар: $contact_goods\nАдрес: $contact_address\n$contact_date";
$sub='Заказ с сайта';
$email='mail@mail.mail';
$send = mail ($address,$sub,$mes,"Content-type:text/plain; charset = utf-8\r\nFrom:$email");
ini_set('short_open_tag', 'On');
header('Refresh: 3000; URL=index.html');
}
function check($key) {
return isset($_POST[$key]) && !empty($_POST[$key]);
}
server {
return 503;
.........
}