Crazydog
08-21-2006, 08: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>");
}
?>
<?
//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>");
}
?>