DLee
12-01-2004, 08:22 PM
I'm not new to coding and web design, but i'm fairly new to php. So here's the issue:
<?
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="wildbill@bigsecret.com";
$message="You have a new comment from $email. The comment: \n$comments\n\n";
if(mail($to,"Comments From Your Site",$message,"From: $email\n"))
{
echo "Thanks for your comments.";
}
else
{
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
I would much rather have the form go to either goodjob.html or youscrewedupsomewhere.html than having it echo simple text. I know the META refresh trick, but that isn't what I'm looking for.
I'm sure you guys can figure this one out, so I'll say thanks in advance,
DLee
<?
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="wildbill@bigsecret.com";
$message="You have a new comment from $email. The comment: \n$comments\n\n";
if(mail($to,"Comments From Your Site",$message,"From: $email\n"))
{
echo "Thanks for your comments.";
}
else
{
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
I would much rather have the form go to either goodjob.html or youscrewedupsomewhere.html than having it echo simple text. I know the META refresh trick, but that isn't what I'm looking for.
I'm sure you guys can figure this one out, so I'll say thanks in advance,
DLee
