Problem: I have made a form to email processor, and it hasn't been seeming to work. Although, when I hit the submit button, it does direct the user to the page that I set it to go to after submitted.

Hosting: Right now, I am using Award Space. I was thinking maybe my form wasn't working because of the hosting, but when I tried my form on pay-hosting, it still didn't work.

THE CODE

<html>
<title>PIREP</title>
<form method="post" action="pirep.php">
Account Name: &nbsp;<input name="account" type="text" /><br><br>
Email: <input name="email" type="text"><br><br>
Flight Call Sign: <input name="Callsign" type="text"><br><br>
Total Flight Time: <input name="time" type="text" value="0hours 0minutes"><br>

<br><INPUT type="submit" " value="Submit PIREP">
</form>
</html>

PROCESSOR BELOW

<?php
$account = $REQUEST['account'] ;
$email = $
REQUEST['email'] ;
$Callsign = $REQUEST['Callsign'] ;
$time = $
REQUEST['time'] ;

mail( "rdiddie7@yahoo.com", "Sign Up: Pilot Tracker",
$message, "From: $email" );
header( "Location: thankyou.html" );
?>

QUESTION: HELP ME! 🙂

    I've never used the mail function on a shared host before, but I could see how they might not allow their users to send email to any address they want...eg: rdiddie7@yahoo.com

    Do you have an email account with them, maybe on the server you are sending from? If so, try sending to that one. Seems like if they let you send to anywhere you wanted, you could easily turn their server into an open relay.

      Make sure you use mail() correctly:

      $to = $email;
      $subject = "Your subject!";
      $body = "This is the body message\n\n";
      $body .= "blah.................\n\n";
      $body .= "blah.................\n\n";
      $header = "From: Your comapny <your@email.com>\r\n";
      $header .= "Reply-To: your@email.com";
      @mail($to, stripslashes($subject), stripslashes($body), $header);
      

        Well, I don't see how $to = $email;
        $subject = "Your subject!";
        $body = "This is the body message\n\n";
        $body .= "blah.................\n\n";
        $body .= "blah.................\n\n";
        $header = "From: Your comapny <your@email.com>\r\n";
        $header .= "Reply-To: your@email.com";
        @mail($to, stripslashes($subject), stripslashes($body), $header);

        would be much different from my original one.

          Why would

          $to = $email;
          $subject = "Your subject!";
          $body = "This is the body message\n\n";
          $body .= "blah.................\n\n";
          $body .= "blah.................\n\n";
          $header = "From: Your comapny <your@email.com>\r\n";
          $header .= "Reply-To: your@email.com";
          @mail($to, stripslashes($subject), stripslashes($body), $header);

          be any different from the one I already have?

            Write a Reply...