Chcę również dodać wiadomość która ukaże się jeżeli ktoś nie wpisał emaila, że musi podać swój email adres (gościu@cokolwiek.cokolwiek), oraz dodać do kodu zasadę że bez podania email adresu wiadomość zostanie nie wysłana.
dzieki
podaje kod jakiego użyłem:
<?php /* Email Variables */ $emailSubject = 'contactformprocess!'; $webMaster = 'forma3d@forma3d.pl'; /* Data Variables */ $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; $body = <<<EOD <br><hr><br> Name: $name <br> Email: $email <br> Comments: $comments <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $headers); /* Results rendered as HTML */ $theResults = <<<EOD <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="5;URL=http://www.forma3d.pl/kontakt.html"> <style type="text/css"> <!-- body { background-color: #444; font-family: Century Gothic; font-size: 20px; font-style: normal; line-height: normal; font-weight: normal; color: #7cc242; text-decoration: none; padding-top: 200px; margin-left: 150px; width: 800px; } --> </style> </head> <div align="center"> Twoja wiadomość została przesłana do Forma 3D. Odpowiemy tak szybko, jak będzie to możliwe. Pozdrawiamy. Za kilka sekund powrócisz do Forma 3D. !</div> </div> </body> </html> EOD; ?>
Pozdrawiam