-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreturn-call.php
27 lines (23 loc) · 1.03 KB
/
return-call.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
$name = $_POST['name'];
$phone = $_POST['phone'];
$name = htmlspecialchars($name);
$phone = htmlspecialchars($phone);
$name = urldecode($name);
$phone = urldecode($phone);
$name = trim($name);
$phone = trim($phone);
if (mail("alexeiromanov41@gmail.com, alexeiromanov41@yandex.ru, 0032@ro.ru", "Обратный звонок", "Имя: ".$name."\r\nТелефон: ".$phone ,"From: 0032@ro.ru")) {
// echo "сообщение успешно отправлено";
// $redirect = isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER']:'form_ok.html';
$redirect = isset($_SERVER['HTTP_REFERER'])? 'form_ok.html':$_SERVER['HTTP_REFERER'];
header("Location: $redirect");
exit();
}
else {
// echo "при отправке сообщения возникли ошибки";
$redirect = isset($_SERVER['HTTP_REFERER'])? 'form_fail.html':$_SERVER['HTTP_REFERER'];
header("Location: $redirect");
exit();
}
?>