Answer the question
In order to leave comments, you need to log in
How to add a title to a contact form?
Good day everyone! There is a feedback form:
<?php
$back = "<p><a href=\"javascript: history.back()\">Вернуться назад</a></p>";
header('Refresh: 2; url=https://www.site.ru/');
if(!empty($_POST['name']) and !empty($_POST['phone']) and !empty($_POST['mail']) and !empty($_POST['message'])){
$name = trim(strip_tags($_POST['name']));
$phone = trim(strip_tags($_POST['phone']));
$mail = trim(strip_tags($_POST['mail']));
$message = trim(strip_tags($_POST['message']));
mail('[email protected]', 'Письмо с адрес_вашего_сайта', 'Вам написал: '.$name.'<br />Его номер: '.$phone.'<br />Его почта: '.$mail.'<br />Его сообщение: '.$message,"Content-type:text/html;charset=utf-8");
echo "<p style='color:black;font-size:35px;text-align:center;margin-top: 20%;'>Ваше сообщение успешно отправлено!</p><Br><p style='color:black;font-size:35px;text-align:center;'>Наш менеджер свяжется с Вами в тчение 10 минут</p>.";
exit;
}
else {
echo "Для отправки сообщения заполните все поля! $back";
exit;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question