Okay first of all when i hit the submit button nothing happens try it at www.screwcops.com then if i put in a default value through the url it doesn't send it what is going on here?

   <?PHP 

if ($message == "") {
   $formErr .= "- Suggestion!<br>";
}

if ($formErr) {
   echo "Sorry, the following fields contained invalid data or were left blank:<br>" . $formErr;
}
else {
      echo "<h1>Thank You</h1><h3> For your suggestion. Below is what you sent.</h3><br>";

  echo "Message: <b>$message</b><br>";

//Declare the variables
$recipient = "shawnhbk@comcast.net";
$subject = "$siteurl". "Suggestion";
$message = "$message ";
$name = "somebody";

//Contents of form

$message =$_POST['message'] . "\r\n" ;



//mail() function sends the mail
mail($message,$mailheader, $name);
}


  ?>

    It worked for me, I got to the $formErr block ... what browser were you using?

      I'm using mozilla the code says it was sent but i never receive it.

        Try saving this code as "test.php"

        <?php (mail('me@mydomain.com', 'testing', 'testing 123')) ? print 'sent' : print 'not sent'; ?>

        Then go to the file url (yourdomain/test.php) and see if when this one says sent, it did. That will give us a clue as to what is really wrong.

          Which is probably why Mail::Send() is a much better choice in this case for better debugging and delivery options.

            Write a Reply...