Javascript-форум (https://javascript.ru/forum/)
-   (X)HTML/CSS (https://javascript.ru/forum/xhtml-html-css/)
-   -   Помогите прошу. Формы не отправляются (https://javascript.ru/forum/xhtml-html-css/50975-pomogite-proshu-formy-ne-otpravlyayutsya.html)

Georka 19.10.2014 18:15

Помогите прошу. Формы не отправляются
 
Ребят. Всем привет.
В итоге ситуация такая.
вот мой сайт: http://remkachestvo.ru

У меня на сайте 2 формы.
1) order.php Форма заявки
2) send.php Форма обратной связи

Вроде как написал их правильно.
Но, сообщения приходят с вероятностью 15%.
И то если приходят то через минут 20.
Что делать? помогите.

Вот обе формы:
order.php :
Цитата:

<?php
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['phone'])) {$phone = $_POST['phone'];}
if (isset($_POST['after'])) {$after = $_POST['after'];}
if (isset($_POST['before'])) {$before = $_POST['before'];}
if (isset($_POST['work'])) {$work = $_POST['work'];}
if (isset($_POST['email'])) {$email = $_POST['email'];}
if (isset($_POST['quest'])) {$quest = $_POST['quest'];}

$to = "remkachestvo@mail.ru";
$headers = "Content-type: text/html;charset=utf-8 \r\nFrom:$email";
$subject = "Заявка с сайта «RemKachestvo.Ru»";
$message = "<p>Заявка с сайта «RemKachestvo.Ru»</p>
\n<p><strong>Имя:</strong> $name</p>
\n<p><strong>Тел:</strong> $phone</p>
\n<p><strong>Дата начала работы:</strong> $after</p>
\n<p><strong>Дата окончания работы:</strong> $before</p>
\n<p><strong>Нужная услуга:</strong> $work</p>
\n<p><strong>E-mail:</strong> $email</p>
\n<p><strong>Вопрос:</strong> $quest</p>";
$send = mail ($to, $subject, $message, $headers);
header( "Location: http://remkachestvo.ru/send.html" );
?>
send.php:
Цитата:

<?php
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['email'])) {$email = $_POST['email'];}
if (isset($_POST['quest'])) {$quest = $_POST['quest'];}

$to = "remkachestvo@mail.ru";
$headers = "Content-type: text/html;charset=utf-8 \r\nFrom:$email";
$subject = "Заявка с сайта «RemKachestvo.Ru»";
$message = "<p>Сообщение от « RemKachestvo.Ru »</p>
\n<p><strong>Имя:</strong> $name</p>
\n<p><strong>Email:</strong> $email</p>
\n<p><strong>Вопрос:</strong> $quest</p>";
$send = mail ($to, $subject, $message, $headers);
header( "Location: http://remkachestvo.ru/send.html" );
?>

Georka 19.10.2014 21:43

Сделал вот так:
Код:

<?php
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$after = $_REQUEST['after'];
$before = $_REQUEST['before'];
$work = $_REQUEST['work'];
$email = $_REQUEST['email'];
$quest = $_REQUEST['quest'];
$headers= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html;charset=utf-8 \r\nFrom:$email";

$message = "<p>Заявка с сайта «RemKachestvo.Ru»</p>
\n<p><strong>Имя:</strong> $name</p>
\n<p><strong>Тел:</strong> $phone</p>
\n<p><strong>Дата начала работы:</strong> $after</p>
\n<p><strong>Дата окончания работы:</strong> $before</p>
\n<p><strong>Нужная услуга:</strong> $work</p>
\n<p><strong>E-mail:</strong> $email</p>
\n<p><strong>Вопрос:</strong> $quest</p>";

mail( "remkachestvo@mail.ru", "RemKachestvo.Ru",
    $message, $headers );
  header( "Location: http://remkachestvo.ru/send.html" );
?>

И вроде как нормально работает..
Вот только теперь сообщения приходят сразу но не всегда.
Тоесть как я понял не все отсылаются...
Как это исправить?

Georka 19.10.2014 21:54

Может ли это быть из-за того что у меня метод POST ??
У меня вот так сейчас:
<form action="/order.php" method="post" id="contact-form">


Часовой пояс GMT +3, время: 08:04.