php mail send form question?
        Posted  
        
            by eberswine
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by eberswine
        
        
        
        Published on 2010-05-20T23:58:15Z
        Indexed on 
            2010/05/21
            0:00 UTC
        
        
        Read the original article
        Hit count: 227
        
php
Wondering if anyone know how to automatically send the user an email after he/she fills out a form. I have the form emailed to me after it gets submitted, but I can't figure out how to capture the user's email from the form field and have it send it to them automatically???
Here is some code that I use to send the mail:
  //mail the message before redirecting
if($_POST['dosend'] == "yes"){
// The message
$headers = "From: [email protected]";
$message = "NEW Message :: ".$_POST['event_name']." \n Email: ".$_POST['email']." \n Click link to http://www.domain.com/admin/ Approve this Event!";
// Send
mail('[email protected]', 'New :: Calendar Message', $message, $headers);
}
  //end mail
© Stack Overflow or respective owner