-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.php
More file actions
24 lines (20 loc) · 805 Bytes
/
check.php
File metadata and controls
24 lines (20 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
//print_r($_POST);
$email = $_POST['email'];
$message = $_POST['message'];
$error = '';
if (trim($email) == '' )
$error = 'Ввведите ваш Email';
elseif (trim($message) == '')
$error = 'Введите ваше сообщение';
elseif (strlen($message) < 10)
$error = 'Сообщение должно быть больше 10-ти символов';
if ($error != '') {
echo $error;
exit;
}
$subject = "=?utf-8?B?".base64_encode("Системное сообщение")."?=";
$headers = "From: $email\r\nReply-to: $email\r\nContent-type: text/html;charset=utf-8\r\n";
mail('generationp86@gmail.com', $subject, $message, $headers);
header("Location: /about.php");
?>