There is a working feedback handler code:
<? // если не было добавления сообщения, выводим форму if (!$_POST['a']) show_form(); // проверяем данные формы if (!$_POST['name']) show_form("Укажите Ваше имя!"); if (!$_POST['email']) show_form("Укажите Ваш email!"); if (!$_POST['message']) show_form("Вы не заполнили текст сообщения!"); // описываем переменные и rfc заголовки письма // обратный адрес будет указанным адресом отправителя сообщения $from = $_POST['email']; $recipients = "besidetrue@besidetrue.ru"; // Ваш email $subject=""; $body=$_POST['message']; $headers = $_POST['subject']; if(strpos($_SERVER['SERVER_SOFTWARE'], '(Win32)')===FALSE) { // открываем sendmail и отправляем письмо $mail = popen("/usr/sbin/sendmail -i -f$from -- $recipients", 'w'); $text_headers = "from: $from\nsubject: $subject".$headers; fputs($mail, $text_headers); fputs($mail, "\n"); fputs($mail, $body); // проверяем на ошибку $result = pclose($mail) >> 8 & 0xff; } else $result=(mail($recipients, $subject, $body, "from: ".$from."\r\n".$headers) ? FALSE : TRUE); if ($result) echo "Сообщение не было отправлено!"; else echo "Ваше сообщение отправлено.Администратор свяжется с Вами в ближайшее время!"; ?>
Everything comes to where it should be, but after sending the message it gives out "Your message has been sent and so on" on the WHITE BACKGROUND completely ignoring the changed design for the website. This is the problem.
What to do?
It is necessary that after sending the page of the site is displayed with this notification in the center. php I know only superficially and really need help.