Good afternoon! Faced a problem. You must send the form by clicking on the button to the email box, but when you click on the "Send" button, the browser simply goes to the script page and issues Not Found. Help solve the problem, please. The form itself:
<form id="application" action=" application.php" method="POST" name=" application "> <input name="name" id="zayavkaName" maxlength="20" placeholder="Введите ваше имя" required /><br> <input name="email" type="email" id="applicationEmail" maxlength="20" placeholder="Введите ваш E-mail" required /><br> <input name="telephone" type="Tel" id="applicationTelephone" maxlength="20" placeholder="Введите ваш телефон" required/><br> <button class="applicationButton btn btn-default btn-lg btn-contact" type="submit" form="application">Записаться</button> </form> Aplication.php itself
<?php $sendto = "myemail@email.com"; $username = $_POST['name']; $usertel = $_POST['telephone']; $usermail = $_POST['email']; $subject = "Новое сообщение"; $headers = "From: " . strip_tags($usermail) . "\r\n"; $headers .= "Reply-To: ". strip_tags($usermail) . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html;charset=utf-8 \r\n"; $msg = "<html><body style='font-family:Arial,sans-serif;'>"; $msg .= "<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>Cообщение с сайта</h2>\r\n"; $msg .= "<p><strong>От кого:</strong> ".$username."</p>\r\n"; $msg .= "<p><strong>Почта:</strong> ".$usermail."</p>\r\n"; $msg .= "<p><strong>Сайт:</strong> ".$usertel."</p>\r\n"; $msg .= "</body></html>"; if(@mail($sendto, $subject, $msg, $headers)) { echo "<center><p>Спасибо!</p></center>"; } else { echo "<center><p>Что-то пошло не так!</p></center>"; } ?>
action=" application.php"- Saidolim