View Full Version : small contact form problem

01-05-2012, 09:50 PM
I'm trying to send this info to my email but it keeps giving me an error:

if(isset($_POST['submit'])) {

$to = "user@email.com";
$subject = "Request Info Form 1";
$dropdown1 = $_POST['drop_down1'];
$dropdown2 = $_POST['drop_down2'];
$dropdown3 = $_POST['drop_down3'];
$headers = "user@email.com";

$body = "From: Drop-Down: $dropdown1 \n Drop-Down2: $dropdown2 \n Drop-Down3: $dropdown3";

echo "Data has been submitted to $to!";
mail($to, $subject, $body, $headers);

} else {
echo "blarg!";

its keeps giving me this error:

Data has been submitted to user@email.com (user@email.com)!
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\hshome\design16\lubellrosen.com\work\mailform.php on line 19

I've looked it up in different places but I'm still unsure on how to fix it.

01-05-2012, 09:55 PM
nevermind i fixed it

01-05-2012, 11:35 PM
Should post your solution so other members that have the same or similar problems can see what you did to fix it.