Forum Moderators: coopster
mail( "contact@example.com", "contact us form",
$message, $name, $company, $phone, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>
Contact.php is the script.
Following is the code of htm form, which calls this script.
<form method="post" action="http://example.com/contact.php">
Please help!
Regards,
Primrose
[edited by: encyclo at 3:33 pm (utc) on Jan. 26, 2006]
[edit reason] examplified [/edit]
mail("contact@example.com", "contact us form", $message, $name, $company, $phone, "From: $email" );
The problem is
$message, $name, $company, $phone,
$message.$name.$company.$phone,
or use:
$emailmessage = "Message = $message\n Name= $name\nCompany = $company\nPhone= $phone";
mail("contact@example.com", "contact us form", $emailmessage, "From: $email" );
Also you should add die(); after the header function, just to stop the file being parsed.
Chris