style: add some style 5 (modal form)

This commit is contained in:
2026-06-05 11:55:17 +03:00
parent 00b63f0991
commit d3a6cf9540
2 changed files with 215 additions and 0 deletions

32
send-form.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = strip_tags(trim($_POST["name"]));
$phone = strip_tags(trim($_POST["phone"]));
$email = strip_tags(trim($_POST["email"]));
//$to = "receptionadmin@o-arena.ru"; // поменяй на свой реальный email
$to = "rid89@mail.ru"; // поменяй на свой реальный email
$subject = "Новая заявка с сайта OlimpArena";
$message = "Имя: $name\n";
$message .= "Телефон: $phone\n";
$message .= "Email: $email\n";
$message .= "Дата отправки: " . date('d.m.Y H:i') . "\n";
$headers = "From: no-reply@o-arena.ru\r\n";
$headers .= "Reply-To: $email\r\n";
$headers .= "Content-Type: text/plain; charset=utf-8\r\n";
if (mail($to, $subject, $message, $headers)) {
// Можно перенаправить на успех
header("Location: index.html#booking-success-modal");
// или показать JSON для JS
echo json_encode(["status" => "success"]);
} else {
echo json_encode(["status" => "error"]);
}
} else {
http_response_code(403);
echo "Доступ запрещён";
}
?>