First things first, do yourself a favor and get a html & php editor preferably with syntax checking (some are free, google for notepad++) it saves alot of time...
Ok
In your html file:
1. Make sure you close your html tags (/>)
2. Is
<input type = "text" name="sender_name" size = 30 />
not
<input type = "text" Name="sender_name" size = 30>
.
3. Double check how you name your input tags: "sender_email" is not the same as "sender_mail" (as you do in send_simpleform.php) and im sure that's why nothiing is displayed.
So try this for your html file:
<html>
<head>
<title> Simple feedback form </title>
</head>
<body>
<form method = "post" action="send_simpleform.php">
<p><strong>Your name: </strong>
<input type = "text" name="sender_name" size = 30 /> </p>
<p><strong>Email - ID: </strong>
<input type = "text" name="sender_mail" size = 30 /> </p>
<p><strong>Message: </strong>
<textarea name = "message" cols=30 rows=5 wrap=virtual></textarea> </p>
<p><input type = "submit" name = submit" value="send this form" /> </p>
</form>
</body>
</html>
Now for the send_simpleform.php file :
1. It Is
$_POST
not
$_post
.
2. It Is
_$POST['sender_name']
not
$_POST[sender_name]
3. It is
echo $_POST['sender_mail'];
not
echo "$_POST[sender_email]"
.
So your file must be something like:
<?
if(($_POST['sender_name'] == "") ||
($_POST['sender_mail']== "") ||
($_POST['message'] == ""))
{
//header("Location: simple_form.html");
exit;
}
$msg = "EMail sent from WWW site \n";
$msg .= "senders Name:\t" . $_POST['sender_name'] . "\n";
$msg .= "Senders E-Mail:\t" . $_POST['sender_email']. "\n";
$msg .= "Message:\t" . $_POST['message'] . "\n";
$to = "you@youremail.com";
$subject = "Web Site Feedback";
$mailheaders = "From: My Web Site <genericaddress@yourdomain.com>\n";
$mailheaders .= "Reply-To:" . $_POST['sender_email']. "\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>
<? echo $_POST['sender_name']; ?>
<P><strong>Your E-Mail Address:</strong>
<? echo $_POST['sender_email']; ?>
<P><strong>Message:</strong>
<? echo $_POST['message']; ?>
</BODY>
</HTML>
Try that, I think it will run with no problems.