
January 8th, 2004, 05:47 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
php form problem
cant get this to work...when i uncomment this line:
PHP Code:
//$message = $_POST["message"];
and comment out the other three message lines it works fine.
what am i doing wrong?
PHP Code:
<?php
$sendTo = "info@themovement.com";
$subject = "twm contact form";
// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] .">\r\n";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];
// now we can add the content of the message to a body variable
//$message = $_POST["message"];
$message_ =_ $_POST["message"] ."\n";
$message_.=_$_POST["company"] ."\n";
$message_.= $_POST["phone"] ."\n";
// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);
?>
|