@Kryptonit

Не отправляется форма PHP, в чём ошибка?

<form action="send.php" method="POST">
                    <div class="dannue">
                        <input type="text" name="fio" placeholder="Имя">
                        <input type="text" name="email" placeholder="Почта">
                    </div>
                    <input type="text" name="thema" id="inp" placeholder="Тема">
                    <textarea name="mess" cols="30" rows="10" placeholder="Сообщение"></textarea>
                    <button id="send" type="submit">Отправить</button>
                </form>


<?php
$fio = $_POST['fio'];
$email = $_POST['email'];
$mess = $_POST['mess'];
$thema = $_POST['thema'];
$fio = htmlspecialchars($fio);
$email = htmlspecialchars($email);
$mess = htmlspecialchars($mess);
$thema = htmlspecialchars($thema);
$fio = urldecode($fio);
$thema = urldecode($thema);
$mess = urldecode($mess);
$email = urldecode($email);
$fio = trim($fio);
$email = trim($email);

if (mail("somemail013000@gmail.com", "Заявка с личного сайта:".$thema, "ФИО:".$fio.". E-mail: ".$email. "Сообщение:".$mess ,"egor.kor013000@gmail.com \r\n"))
 {     echo "сообщение успешно отправлено"; 
} else { 
    echo "при отправке сообщения возникли ошибки";
}?>
  • Вопрос задан
  • 109 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы