I use a php contact form that when I get a email from it says its from the email address I have in send from field in the php, but the question I have is, how do I go about getting their email address to come up as from and when I hit reply I don't have to put there email address in the send to field. Here is a look at my php! Thanks, Adam <?php $EmailFrom = "noreply@url.com"; $EmailTo = "adam@url.com"; $Subject = "Contact Question"; $Name = Trim(stripslashes($_POST['Name'])); $Email = Trim(stripslashes($_POST['Email'])); $Subject = Trim(stripslashes($_POST['Subject'])); $Message = Trim(stripslashes($_POST['Message'])); // validation $validationOK=true; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; exit; } // are you human? if ($_POST['human'] == "eFT6GL") { print "<meta http-equiv=\"refresh\" content=\"0;URL=thanks.html\">"; } else { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Subject: "; $Body .= $Subject; $Body .= "\n"; $Body .= "Message: "; $Body .= $Message; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=thanks.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; } ?> PHP:
If I understand you correctly... Replace: $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); PHP: with: $success = mail($EmailTo, $Subject, $Body, "From: <$Email>"); PHP: Also, please consider validating the content (ie. $Email, and all other user submitted data) - this will help prevent spam.