I have a pretty straight forward contact form that should email to the specified email address, but when I fill out the form, and submit, it just takes me to a blank page on contact.php instead of echoing that my message has been sent....
contact.html
<html>
<head> <title>Contact Form</title></head>
<body>
<form method="post" action="contact.php">
Name:<input name="fullname" type="text">
<br /><br />
Email:<input name="email" type="text"><br />
<br />
Message: <br /><textarea rows="5" cols="50" name="
message">
Please type your message here!
</textarea>
<br/>
<br/>
<input type="submit" value="Submit">
</form>
</body>
</html>
contact.php
<?php
ini_set('display_errors','On');
// Grabing the info from the contact form
$name = $_POST['fullname'];
$from = $_POST['email'];
$message = $_POST['message'];
// Email info and variables
$to = "youremail@example.com";
$subject = "Contact Form";
$body = "$message";
$headers = "From: $from" .
"X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message Sent!</p> <br /> <br /> Click <a href="#"> Here</a> to return to the main page.");
} else {
echo("<p>Message delivery failed... Please hit back, and try again.</p>");
}
?>
Any suggestions? :'(
-Thanks