I have a very simple php script for sending data to an email address. When I click the submit button it takes me to the php page which runs (I tested it using the echo command first) but it doesn't seem to send an email. I have tried email addresses that I have as part of my domain hosted here and also other addresses such as google and none of them receive messages from the php script. I don't know if I'm missing a step or what but any help would be greatly appreciated.
Here is my HTML:
And here is my PHP:HTML Code:<html> <head> <title>Contact Us</title> </head> <body> <form action="step2.php" method="post"> Name<br/><input type="text" name="username" /><br/> Email<br/><input type="text" name="email" /><br/> Inquiry<br><textarea row="7" cols="70" name="inquiry"></textarea><br/> <input type="submit" value="Send Message" /> </form> </body> </html>
this is currently located at http://lovingwordministries.org/testphp/step1.htmlPHP Code:<?php
$name = $_POST['username'];
$email = $_POST['email'];
$text = $_POST['inquiry'];
//To, Subject, Message, Header
mail('contactus@lovingwordministries.org', 'Contact Us', $text, 'From: ' . $name . ' <' . $email . '>');
?>


1Likes
LinkBack URL
About LinkBacks

