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 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    57
    Thanks
    8
    Thanked 0 Times in 0 Posts

    small contact form problem

    I'm trying to send this info to my email but it keeps giving me an error:

    PHP Code:
    <?php
    if(isset($_POST['submit'])) {
     
        
    $to "user@email.com"
        
    $subject "Request Info Form 1";
        
    $dropdown1 $_POST['drop_down1'];
        
    $dropdown2 $_POST['drop_down2'];
        
    $dropdown3 $_POST['drop_down3'];
        
    $headers "user@email.com";
     
     
     
     
        
    $body "From: Drop-Down: $dropdown1 \n Drop-Down2: $dropdown2 \n Drop-Down3: $dropdown3";
     
        echo 
    "Data has been submitted to $to!";
        
    mail($to$subject$body$headers);
     
    } else {
        echo 
    "blarg!";
    }
    ?>
    its keeps giving me this error:

    Data has been submitted to user@email.com!
    Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\hshome\design16\lubellrosen.com\work\mailform.php on line 19

    I've looked it up in different places but I'm still unsure on how to fix it.
    Last edited by Spookster; 01-05-2012 at 10:37 PM. Reason: Removed your email address so you don't get data mined

  • #2
    New Coder
    Join Date
    Sep 2011
    Posts
    57
    Thanks
    8
    Thanked 0 Times in 0 Posts
    nevermind i fixed it

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Should post your solution so other members that have the same or similar problems can see what you did to fix it.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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