Contact form reply help

I know enough php to get by but not enough to solve issues. My client would like when the receive the e-mail and hit reply that it will reply to the email entered into the form and not the dummy e-mail. ( hope that makes sense) here is my contactform.php code:

<?php $EmailFrom = "[email protected]"; $EmailTo = "[email protected]"; $Subject = "Madideas Designs Contact Form"; $name = Trim(stripslashes($_POST['name'])); $email = Trim(stripslashes($_POST['email'])); $comment = Trim(stripslashes($_POST['comment'])); $color = Trim(stripslashes($_POST['color'])); // spam if ($process == "yes") { if ($spam != "") { echo "Stupid Spammer"; } else { echo "No Spam. Process Script."; // put the info here to send the email or whatever } } else { echo "What do you think you are doing?"; } // validation $validationOK=true; if (!$validationOK) { print ""; exit; } // prepare email body text $Body = ""; $Body .= "name: "; $Body .= $name; $Body .= "\n"; $Body .= "email: "; $Body .= $email; $Body .= "\n"; $Body .= "comment: "; $Body .= $comment; $Body .= "\n"; $Body .= "color: "; $Body .= $color; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print ""; } else{ print ""; } ?>

Sounds like you need to add header Reply-To:
[php]$success = mail($EmailTo, $Subject, $Body, “From: <$EmailFrom>\nReply-To: <$EmailFrom>”);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service