Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts

    This used to work, why doesnt it now (form)

    What's wrong with this:

    PHP Code:
    <?
    //email removed
    $to 'mail@mail.com';
    $from_header "From: " $_POST['Email'];
    $subject 'Contact';
    $contents $_POST['problem'];
    if(
    $_POST['Email'] && $_POST['problem'] != "")
    {
        
    mail ($to$subject$contents$from_header);
        
    header ("Location: thanks.html");
    }
    else
    {
        print (
    "<HTML><BODY>Error! You didn't fill something out! Please go back and try again!");
    print (
    "</Body></html>");
    }
    ?>

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Posts
    201
    Thanks
    8
    Thanked 1 Time in 1 Post
    What dosnt work about it, the email dosnt get sent? you get an error message ?

  • #3
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yea the email isnt sent.

  • #4
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    you've checked your mail server logs?

  • #5
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts
    can I do that through cpanel, or would I have to contact my host?

    their "sendmail_from" var isn't set...does that matter?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •