Hi - I have been testing this form to email script all night and I cannot get it to work - I get headers but no content and no email as been sent?
Error Log>
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: sender_name in c:\Apache\htdocs\send_simpleform.php on line 4
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: sender_email in c:\Apache\htdocs\send_simpleform.php on line 5
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: message in c:\Apache\htdocs\send_simpleform.php on line 6
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: sender_email in c:\Apache\htdocs\send_simpleform.php on line 11
[Wed Mar 16 22:49:34 2005] [error] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: "sendmail_from" not set in php.ini or custom "From:" header missing in c:\Apache\htdocs\send_simpleform.php on line 13
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: sender_name in c:\Apache\htdocs\send_simpleform.php on line 26
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: sender_email in c:\Apache\htdocs\send_simpleform.php on line 29
[Wed Mar 16 22:49:34 2005] [error] PHP Notice: Undefined variable: message in c:\Apache\htdocs\send_simpleform.php on line 32
Does this look ok?
<?
$msg = "E-Mail Sent from www site\n";
$msg .= "Sender's Name:\t$sender_name\n";
$msg .= "Sender's E-Mail:\t$sender_email\n";
$msg .= "Message:\t$message\n\n";
$to = "enquiries@midastelecom.ws";
$subject = "Web Site Feedback";
$mailheaders = "From: www.midastelecom.com <> \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
?>
<html>
<head>
<title>Simple Feedback Form Sent</title>
</head>
<body>
<h1>The following e-mail has been sent:</h1>
<p><strong>Your Name:</strong><br>
<? echo "$sender_name"; ?>
<p><strong>Your E-Mail Address:</strong><br>
<? echo "$sender_email"; ?>
<p><strong>Message:</strong><br>
<? echo "$message"; ?>
</body>
</html>