how do I get this code to send me an email with the person who is sending it email in the from area of an email, right now it puts my own email address in there so i cant hit reply send. i have to manually copy paste the senders email from the contents of the mail that i receive.
here is the code im using:
<?
// Configuration Settings
$SendTo = "
[email protected]";
$SubjectLine = "subject";
$ThanksURL = "thankyou.html"; //confirmation page
$Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n$Divider\n";
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= "$Divider\n" . $_SERVER["HTTP_USER_AGENT"] . "\n";
$MsgBody = htmlspecialchars($MsgBody); //make content safe
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, $emailaddress ,"From: $http_referrer\n");
header("Location: $ThanksURL");
?>