|
Hi Guys
I followed some tutorials online to have an email submit form on my webpage, I get the message sent response but nothing ever comes into the asigned mail box. Can anyone see where I am going wrong?
Here is the code on my html page:
<form id="contact_form" name="contact_form" action="contact.php" method="get">
<label>Name</label>
<br />
<input name="name" type="text" size="50" />
<label><br />
Email Address</label>
<br />
<input name="email" type="text" size="50" />
<label><br />
Comments</label>
<br />
<textarea name="comments" cols="50" rows="10" dir="ltr" lang="en" xml:lang="en"></textarea>
</label>
<br />
<input name="Submit" type="submit" value="Submit" />
</p>
</form>
And here is the code in the PHP file, which is in the same level dir:
<?
$subject="from ".$_GET['name'];
$headers= "From: ".$_GET['email']."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
mail("rhowbust@yahoo.co.uk", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$_GET['comments']."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script>
//window.close()
</script>
|