I am currently working on a form that would have multiple fields plus an upload file spot. I cannot add the code for the upload file. Also, after clicking submit the form should send an email to the specified email address and currently those emails are not being recieved. All that happens is the php code box ocomes up and lets the user know that the form has been submitted and doesn't re-direct to the thank you page..Please help
Here is my php formmail code...
<?
///////////////////////////////////////////////////////////////////
// PERFECT //
///////////////////////////////////////////////////////////////////
// Configuration Settings
$SendFrom = "sales@lantekon line.com";
$SendTo = "ayob@lantekonl ine.com";
$SubjectLine = "Feedback Submission";
$ThanksURL = "http://www.lantekonlin e.com/html/asset_thankyou. htm"; //confirmation page
$Divider = "~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~";
// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr( $_SERVER["REMOTE_ADD R"]) . "\n$Divider \n";
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= "$Divider\n " . $_SERVER["HTTP_USER_AGEN T"] . "\n";
$MsgBody = htmlspecialchar s($MsgBody); //make content safe
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom");
header("Locatio n: $ThanksURL");
?>
Here is my php formmail code...
<?
///////////////////////////////////////////////////////////////////
// PERFECT //
///////////////////////////////////////////////////////////////////
// Configuration Settings
$SendFrom = "sales@lantekon line.com";
$SendTo = "ayob@lantekonl ine.com";
$SubjectLine = "Feedback Submission";
$ThanksURL = "http://www.lantekonlin e.com/html/asset_thankyou. htm"; //confirmation page
$Divider = "~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~";
// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr( $_SERVER["REMOTE_ADD R"]) . "\n$Divider \n";
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= "$Divider\n " . $_SERVER["HTTP_USER_AGEN T"] . "\n";
$MsgBody = htmlspecialchar s($MsgBody); //make content safe
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom");
header("Locatio n: $ThanksURL");
?>
Comment