@CodeineDesign

Php 404 — Failed to load resource: the server responded with a status of 404 ()?

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
 
<center>
 
<form name="MyForm" id="callbacks" action="" method="POST">

<table class="rr" style="border-style: none;">
    <tr style="border-style: none;">
        <td width="18%"><input name="name" type="text" placeholder="Представьтесь" required/></td>
        <td rowspan="4" width="18%">  
     <div class="example-1">
  <div class="form-group">
    <label class="label">
      <i class="material-icons">attach_file</i>
      <span class="title">Добавить файл</span>
      <input type="file" name="mail_file">
    </label>
  </div>
</div>
  </div>
</div>
</td>
<td rowspan="4" style="border-style: none;"><input id="submit" type="submit" name="done" style="height: 125px; width: 315px;" value="РАССЧИТАТЬ ТЕХНИЧЕСКОЕ ЗАДАНИЕ"/></td>
    </tr>
    <tr style="border-style: none;">
        <td><input type="text" style="margin-top: px;" name="phone" type="tel" placeholder="Ваш телефон" required/></td>
    </tr>
    <tr style="border-style: none;">
        <td><input type="text" style="margin-top: px;" name="email" placeholder="Ваш email" required/></td>
    </tr>
</table>
</form>
<div id ="erconts" style="display: none">
</div>

</center>

<script>
$(document).ready(function()
{
        $("#submit").click(function()
        {
                $("#erconts").fadeIn(500);
                $.ajax(
                {
                        type: "POST",
                        url: "tehz/tz.php", // Адрес обработчика
                        data: $("#callbacks").serialize(),
                        error:function()
                        {
                                $("#erconts").html("Произошла ошибка!");
                        },
                        beforeSend: function()
                        {
                                $("#erconts").html("Отправляем данные...");
                        },
                        success: function(result)
                        {
                                $("#erconts").html(result);
                                checkThis();
                        }
                });
        return false;
        });
});
</script>


<?
 
if(isset($_POST["name"]))
{
        if(isset($_POST["name"]))
        {
                $name = $_POST["name"];
        }
        if(isset($_POST["phone"]))
        {
                $phone= $_POST["phone"];
        }
 
        if($name=="" or $phone=="")
        { // Проверяем на заполненность всех полей.
                echo "Пожалуйста, заполните все поля";
        }
        else
        {
                $ip=$_SERVER["REMOTE_ADDR"]; // Вычисляем ip пользователя
                $brose=$_SERVER["HTTP_USER_AGENT"]; // Вычисляем браузер пользователя
                $to = "clearain@mail.ru"; // Ваш email адрес
                $subject = "Техническое Задание на расчет"; // тема письма
                $headers .= "Content-Type: text/html;
                ";
                $headers .= "Отправитель: Посетитель сайта"; // Отправитель письма
                $message = "
                Имя: $name<br>
                Телефоны: $phone<br>
                Текст: $body<br><br>
 
                IP отправителя: $ip<br>
                Браузер отправителя: $brose<br>
                ";
 
                $send = mail($to, $subject, $message, $headers);
                if ($send == "true")
                {
                        echo "Ваше сообщение отправлено. Мы ответим вам в ближайшее время.";
                }
                else
                {
                        echo "Не удалось отправить, попробуйте снова!";
                }
        }
}
 
?>


Ошибка:

uslugi-i-stoimost-klininga.html:596 Uncaught ReferenceError: checkThis is not defined
at Object.success (uslugi-i-stoimost-klininga.html:596)
at i (jquery.js?2019-2-7-0:2)
at Object.fireWith [as resolveWith] (jquery.js?2019-2-7-0:2)
at A (jquery.js?2019-2-7-0:4)
at XMLHttpRequest. (jquery.js?2019-2-7-0:4)
success @ uslugi-i-stoimost-klininga.html:596
i @ jquery.js?2019-2-7-0:2
fireWith @ jquery.js?2019-2-7-0:2
A @ jquery.js?2019-2-7-0:4
(anonymous) @ jquery.js?2019-2-7-0:4
load (async)
send @ jquery.js?2019-2-7-0:4
ajax @ jquery.js?2019-2-7-0:4
(anonymous) @ uslugi-i-stoimost-klininga.html:580
dispatch @ jquery.js?2019-2-7-0:3
q.handle @ jquery.js?2019-2-7-0:3
  • Вопрос задан
  • 72 просмотра
Пригласить эксперта
Ответы на вопрос 1
ThunderCat
@ThunderCat Куратор тега CSS
{PHP, MySql, HTML, JS, CSS} developer
Во первых нахрена эти простыни здесь?
Во вотрых почему тег внезапно css?
В третьих - проблему описать букв не хватило?

Uncaught ReferenceError: checkThis is not defined
Что не понятно? Написано же что не определено checkThis, неужели так лень прочитать?
Ответ написан
Ваш ответ на вопрос

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

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