Hi,
I'm in the process of creating a form for the first time.
All appears to be work until I click submit then instead of sending the e-mail it diects you to php script.
I wonder if you coding geniuses could shed any light on this.
my php code look as follows:
I'm in the process of creating a form for the first time.
All appears to be work until I click submit then instead of sending the e-mail it diects you to php script.
I wonder if you coding geniuses could shed any light on this.
my php code look as follows:
Code:
<?php
$emailSubject = 'contactform';
$webMaster = 'info@dinkcreative.co.uk';
$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="5;URL=http://www.dinkcreative.co.uk/contact.htm">
<style type="text/css">
<!--
body {
background-color:
font-family: Tahoma, Geneva, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #000;;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Your message has been sent! We are now dealing with your request will get back to you asap</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Comment