...

View Full Version : This used to work, why doesnt it now (form)



Crazydog
08-21-2006, 09:17 PM
What's wrong with this:


<?
//email removed
$to = 'mail@mail.com';
$from_header = "From: " . $_POST['Email'];
$subject = 'Contact';
$contents = $_POST['problem'];
if($_POST['Email'] && $_POST['problem'] != "")
{
mail ($to, $subject, $contents, $from_header);
header ("Location: thanks.html");
}
else
{
print ("<HTML><BODY>Error! You didn't fill something out! Please go back and try again!");
print ("</Body></html>");
}
?>

Anthony2oo4
08-21-2006, 10:03 PM
What dosnt work about it, the email dosnt get sent? you get an error message ?

Crazydog
08-21-2006, 11:30 PM
yea the email isnt sent.

GJay
08-21-2006, 11:31 PM
you've checked your mail server logs?

Crazydog
08-22-2006, 08:38 AM
can I do that through cpanel, or would I have to contact my host?

their "sendmail_from" var isn't set...does that matter?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum