Witam,jestem w trakcie tworzenia własnej stronki i napotkałem problem którego nie mogę rozwiązać.Niestety nie znam za bardzo języka php a problem może być "banalny" do rozwiązania dla osób które pracują w tym języku na co dzień.Oto adres mojej strony i formularza kontaktowego
http://pawelradzieta.xtreemhost.com/index1.php .Jak widać formularz prawidłowo zachowuje się gdy pola nie są wypełnione i próbujemy wysłać wiadomość oraz jest potwierdzenie kiedy wiadomość została wysłana lecz wiadomości niestety nie dochodą na moja skrzynkę w gmail.Formularz oczywiście nie jest mojego autorstwa został ściągnięty z
http://madebyblaze.com/examples/awesomeform/.Paczka składa się z kilku plików index.php(zawarty jest w nim jquery) ,send_email.php trzech arkuszy styli oraz zdjęć.Zmian dokonałem tylko w index.php gdzie zmieniłem nazwy obok formularzy na polskie a także w send email_php gdzie ustawiłem swój email na gmailu.Moja stronka stoi na darmowym serwerze xtreemhost.com może tutaj jest problem ?Chciałbym także z Waszą pomocą ulepszyć ten formularz to znaczy chciałbym aby po wysłaniu wiadomości pola ulegały samoczynnemu oczyszczaniu,bo teraz jest tak iż pole czyści się ale dopiero po odświeżeniu strony,czy taki zabieg jest trudny do wykonania?, Będę bardzo wdzięczny za każdą pomoc..POZDRAWIAM
Tak wyglądają ustawienia w send_email
<?php
// =====================================
// name: Ajax'd Form with Fancy Email
// version: 1.3
// author: Blaze Pollard
// date: 07.16.10
// =====================================
$message = '<html><body>';
// You can change the header to be an image, just add the <img> tag.
$message .= '<h1>Hey, this is the header.</h1>';
// Table Layout
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'><td><strong>Name:</strong> </td><td>" . strip_tags($_POST['name']) . "</td></tr>"; $message .= "<tr><td><strong>Email:</strong> </td><td>" . strip_tags($_POST['email']) . "</td></tr>"; $message .= "<tr><td><strong>Subject:</strong> </td><td>" . strip_tags($_POST['subject']) . "</td></tr>"; $message .= "<tr><td><strong>Message:</strong> </td><td>" . strip_tags($_POST['message']) . "</td></tr>"; $message .= "</table>";
$message .= "</body></html>";
// Email Config
$subject = "Contact form submitted!";
$email_to = 'panteranaxt@gmail.com'; // Insert Email Address
$body = <<<HTML
$message
HTML;
$headers .= "Reply-To: $email\r\n";
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
if(mail($email_to, $subject, $message, $headers)){ echo 'sent'; // we are sending this text to the ajax request telling it that the mail is sent.. }else{
echo 'failed';// ... or this one to tell it that it wasn't sent }
?>