QSX,
Thanks a lot for your advise, I changed all that and still my code did not quite send the form the way I wanted so I decided to start all over and with a smaller code this time, and yet I still have the same problem - The php script does not send the email. It displays the php page whenever the submit button is pressed but the email containing the data filled in the form is not sent to the email address at all.
I have included both html and php codes at the end. Please help me out, I really want to understand what I'm doing. Thanks.
HTML CODE
<html>
<head><title>comment</title>
<body>
<form action="thanks2.htm" method="post" name="comment">
<table width="533" height="201" border="0">
<tr>
<td width="244" height="65"><div align="right"><h3>NAME</h3></div></td>
<td width="279"><input type="text" name="name" size="20" /> </td>
</tr>
<tr>
<td height="63"><div align="right">
<h3>EMAIL</h3>
</div></td>
<td><input type="text" name="email" size="20" /></td>
</tr>
<tr>
<td><div align="right">
<h3>COMMENT</h3>
</div></td>
<td>
<textarea name="Comment" rows="5" cols="20"></textarea>
</p> </td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="reset" value="Start Over" />
</div>
</form>
</body>
</html>
PHP SCRIPT
<?php
$name=$_POST[NAME];
$email=$_POST[EMAIL];
$comment=$_POST[COMMENT];
$to="whitelexi@hotmail.com";
$re="New Customer on E-Train";
$msg="$comment"
mail($to, $re, $msg);
<html>
<head>
<title>Thanks2</title>
<link href="style.css" rel="stylesheet"/>
</head>
<body>
<h3>THANKS FOR YOUR APPLICATION, WE SHALL RESPOND TO THE FOLLOWING ADDRESS WITHIN 24HOURS.</h3>
Message recieved from <?php echo($name);?></p>
Reply to <?php echo($name); echo($email);?></p>
Home</p>
</body>
</html>