style: add some style 5 (modal form)
This commit is contained in:
32
send-form.php
Normal file
32
send-form.php
Normal 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 "Доступ запрещён";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user