Hi!
I am getting an unknown error with line 24 in this little email script. Can anyone see a glaring problem with it?
This is line 24: $formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email");
<?
// write form results to file
$fp = fopen("form-results.txt", "a");
fwrite($fp, $_POST['name'] . "," .
$_POST['phone'] . "," .
$_POST['email'] . "," .
$_POST['comments'] . "," .
date("M-d-Y") . "\n");
fclose($fp);
// send form results through email
$recipient = "me@me.com";
$subject = "Web Form Results";
$forminfo =
($_POST['name'] . "\r" .
$_POST['phone'] . "\r" .
$_POST['email'] . "\r" .
$_POST['comments'] . "\r\n" .
date("M-d-Y") . "\r\n\n");
$formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email");
?>
<!-- end form -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td> <p align="left">Thank you. You have successfully submitted the following information:</p>
<p><? echo nl2br($forminfo); ?></p>
</tr>
</table>
</body>
</html>