Inside the modal window, the feedback form, when I fill it in and click send, redirects to send.php while the screen is empty and nothing comes to the mail. Exactly the same form of communication is on the site, not nested in a modal window, everything comes from it. In the layout newcomer, tell me how to fix it?

function changeurl(){eval(self.location="http://belswiss-doors.ru/");} window.setTimeout("changeurl();",3000); 
 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <div class="title modal-title" id="myModalLabel"><span class="title_span title_modal">ПОДРОБНЕЕ</span> О ДВЕРИ</div> </div> <div class="modal-body"> <div class="sound"> <div class="sound_title">ПРЕВОСХОДНАЯ ЗВУКОИЗОЛЯЦИЯ</div> <div class="sound_desc">двухкомпонентный пенополиуретан высокой плотности служит лучшим термосберегающим наполнителем. Данный материал равномерно заполняет все полотно и при застывании в горячих прессах связывается со всеми элементами, образуя единый моноблок и термозащиту. А также хорошо поглощает звуковые волны благодаря своим физическим свойствам. (Волна звука гасится в пузырьках пены)</div> </div> <div class="question"> <div class="quest_titile title"><span class="title_span quest_span">ОСТАЛИСЬ<br></span> ВОПРОСЫ?</div> <form class="form-inline" action="send.php" method="post"> <input type="text" id="email" placeholder="ИМЯ" name="fio"> <input class="phone_clear" type="text" id="pwd" placeholder="ТЕЛЕФОН" name="phone" required> <button id="submit_desc" class="submit_form" type="submit">ОТПРАВИТЬ</button> </form> </div> <div class="sound aim"> <div class="sound_title aim_title">ЦЕЛЬНАЯ КОНСТРУКЦИЯ</div> <div class="sound_desc aim_desc">Дверной блок выполнен по бессварной технологии на высокоточном оборудовании - цельногнутая конструкция. Полотно не имеет сварных швов (основная точка коррозии).</div> </div> </div> </div> </div> </div> <script defer src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script defer src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script> 

PHP code:

 if(isset($_POST['submit'])){ $to = "myemail@gmail.com"; $from = "info@belswi.ru"; $fio = $_POST['fio']; $phone = $_POST['phone']; $subject = "Заявка с сайта"; $mail_to_myemail = "Здравствуйте! Было отправлено сообщение с сайта! Имя отправителя: $fio Номер телефона: $phone Чтобы ответить на письмо, создайте новое сообщение, скопируйте электронный адрес и вставьте в поле Кому."; $headers = "From: $from \r\n"; mail($to, $subject, $mail_to_myemail, $headers . 'Content-type: text/plain; charset=utf-8'); echo "Сообщение отправлено. Спасибо Вам " . $first_name . ", мы скоро свяжемся с Вами."; echo "<br /><br /><a href='http://belswiss-doors.ru/'>Вернуться на сайт.</a>"; } ?> 
  • Everything works. - doox911

0