Answer the question
In order to leave comments, you need to log in
Why is the POST request taking so long?
The usual script for sending an email.
<?php
$back = "<p><a href=\"javascript: history.back()\">Вернуться назад</a></p>";
if(!empty($_POST['name']) and !empty($_POST['phone'])){
$name = trim(strip_tags($_POST['name']));
$phone = trim(strip_tags($_POST['phone']));
mail('[email protected]', 'Письмо с адрес_вашего_сайта',$name, $phone,"Content-type:text/html;charset=utf-8");
echo "Ваше сообщение успешно отправлено!<br>Вы получите ответ в ближайшее время<br>$back";
exit;
}
else {
echo "Для отправки сообщения заполните все поля! $back";
exit;
}
?>
Answer the question
In order to leave comments, you need to log in
So the mail function is running for a long time, what local server / assembly Denwer, OpenServer do you have, did you manually install Apache, PHP or what?
PS And you have Linux, but the question remains, something with DNS most likely, try to specify a normal mailbox ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question