Disney Maniac
11-19-2008, 03:47 AM
I have created a php file to process my web forum and for some reason, it does not want to work. Can anyone please help me? I am using Dreamweaver 8, if you need the html, please just ask and I will also post it. Thank you.
Here is the code:
<?php
/* Subject and email variables */
$emailSubject = 'Website Comments';
$webMaster = 'baysidemarc@msn.com';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$commentsField = $_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: txt/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Thank you</title>
<style type="text/css">
<!--
body {
background-image: url();
background-color: #0066FF;
}
.style2 {font-family: "Walt Disney Script v4.1"; font-size: 36pt; color: #3333CC; }
.style28 {
font-size: 12pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
}
-->
</style>
<style type="text/css">
<!--
.style31 {color: #0000FF}
-->
</style>
</head>
<body>
<h1>Thank you for your Email, it will be replyed to very shortly!</h1>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Here is the code:
<?php
/* Subject and email variables */
$emailSubject = 'Website Comments';
$webMaster = 'baysidemarc@msn.com';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$commentsField = $_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: txt/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Thank you</title>
<style type="text/css">
<!--
body {
background-image: url();
background-color: #0066FF;
}
.style2 {font-family: "Walt Disney Script v4.1"; font-size: 36pt; color: #3333CC; }
.style28 {
font-size: 12pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
}
-->
</style>
<style type="text/css">
<!--
.style31 {color: #0000FF}
-->
</style>
</head>
<body>
<h1>Thank you for your Email, it will be replyed to very shortly!</h1>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>