Forum Moderators: coopster
All day long I've been trying to get a script to work that would send the form values. One script I found that worked sent values, but no more than five (got an error message saying that "mail ()" was expecting no more than five parameters).
Anyway, somebody suggested adding additional headers. I did that with this script, but it's still not quite there.
Please, please help!
Here's where I'm at now:
<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($company);
$phone = stripslashes($phone);
$fax = stripslashes($fax);
$address = stripslashes($address);
$city = stripslashes($city);
$state = stripslashes($state);
/* additional headers */
$headers .= "From: $name\r\n";
$headers .= "Email: $email\r\n";
$headers .= "Company: $company\r\n";
$headers .= "Phone: $phone\r\n";
$headers .= "Fax: $fax\r\n";
$headers .= "Address: $address\r\n";
$headers .= "City: $city\r\n";
$headers .= "State: $state\r\n";
mail('myemail@somewhere.com', "Request For News Releases", $headers);
?>
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($company);
$phone = stripslashes($phone);
$fax = stripslashes($fax);
$address = stripslashes($address);
$city = stripslashes($city);
$state = stripslashes($state);/* additional headers */
$message = "Name: $name\r\n";
$message .= "Email: $email\r\n";
$message .= "Company: $company\r\n";
$message .= "Phone: $phone\r\n";
$message.= "Fax: $fax\r\n";
$message.= "Address: $address\r\n";
$message.= "City: $city\r\n";
$message.= "State: $state\r\n";mail('myemail@somewhere.com', "Request For News Releases", $message, "From:$name<$email>");
:)