I am going insane here, for the life of me I can't get this to work. I am trying to use a forum, to send an email, but the mail() function isn't working. The info from the html form page transfers over the php page just fine, but when gets to the mail() function it doesn't do anything. I don't get an error or anything, it just doesn't send.
PHP Code:
$school = $_POST['school'];
$email = $_POST['email'];
$schoolType = $_POST['schoolType'];
$track = $_POST['track'];
$class = $_POST['class'];
$first = $_POST['first'];
$last = $_POST['last'];
$item = $_POST['item'];
$code = $_POST['code'];
$discription_string = $_POST['discription_string'];
if ($school != '' && $email != '' && $schoolType != '' && $track != '' && $class != '' && $first != '' && $last != '' && $item != '' && $code != '' && $discription_string != '')
{
$To = 'Bob Smith <bobsmith@yahoo.com>';
$Subject = $school;
$Message = $school . '<br />' . $schoolType . $tract . '<br />' . $first . '<br />' . $last . '<br />' . $item . '<br />' . $code . '<br />' . $discriptoin_string;
$headers = 'From: ' . $school . ' <' . $email . '>\r\n';
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($To,$Subject,$Message,$headers);
echo '<h4 align="center">Your message has been sent.</h4>';
}





Bookmarks