PHP Contact Form Question?
I'm trying to make a contact form that emails. This code used to work and nothing about my server has changed but not so much anymore. If you guys could help I'd greatly appreciate it.
Code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$to = "shadow_slayer15@yahoo.com";
$body =
<<<EOD
<br/><hr/><br/>
Name: $name<br/>
Email Address: $email<br/>
Subject: $subject<br/>
Message: $message<br/>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-Type: text/html\r\n";
$success = mail($to, $subject, $body, $headers);
$win = <<<EOD
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>Thank You for Your Email</title>
</head>
<body>
<div id="header">
<h2>Craig Spector</h2>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="read.html">Read</a></li>
<li><a href="books.html">Books</a></li>
<li><a href="pov.html">POV</a></li>
<li><a href="av.html">A/V</a></li>
<li class="selected"><a href="contact">Contact</a></li>
</ul>
</nav>
<div id="head-gal">
<a href="http://www.facebook.com/craigspector"><img src="images/social-icons/facebook.png" width="100" height="100" alt="Facebook" /></a>
<a href="http://www.linkedin.com/in/craigspector"><img class="mid" src="images/social-icons/linkedin.png" width="100" height="100" alt="Linked In" /></a>
<a href="http://www.myspace.com/craigspector"><img class="left" src="images/social-icons/myspace.png" width="100" height="100" alt="Myspace" /></a>
</div><!-- end head-gal -->
</div><!-- end header -->
<div id="content">
<div id="inner-content">
<h2>Thank You for Contacting Me</h2>
<div class="padding"></div><!-- end padding -->
</div><!-- end inner content -->
</div><!-- end content -->
</body>
</html>
EOD;
echo $win;
?>