This for was working but for some reason it has stopped. This is the code on my website: <form method="POST" action="mail.php"> Your Name: <br /> <input type="text" name="name" size="45"><br> <br> Your Email: <br /> <input type="text" name="email" size="45"><br> <br> Your Message: <br /> <textarea rows="5" name="message" cols="36"></textarea> <img src="http://www.hybrid-computers.biz/phone.gif" alt="Phone" width="158" height="100" hspace="17" align="top" /><img src="http://www.hybrid-computers.biz/email.gif" alt="Email" width="100" height="90" align="top" /><br> <input type="submit" value="Submit" name="submit"> </form> Code (markup): And this is the code in mail.php: <?php if(isset($_POST['submit'])) { $to = "mail@computer-juice.com"; $subject = "Enquiry - Hybrid Computers"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "Name: $name_field Email: $email_field Message: $message"; echo "Thank you for contacting us."; mail($to, $subject, $body); } else { echo "blarg!"; } ?> Code (markup): Any help appriciated.
If it seems to be working but you're not getting the email, you can check your mail server logs to see if it's being sent/received.