Soldato
- Joined
- 1 Sep 2005
- Posts
- 10,001
- Location
- Scottish Highlands
Apparently the mailer.php on my website isn't working. Any ideas why?
Mailer.php;
Contact.html;
Page in question is;
http://www.afowler.co.uk/contact.php
Im sure it used to work :/
Mailer.php;
PHP:
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "Website Contact";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
echo "Message has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "error: no data sent!";
}
?>
Contact.html;
Code:
<p>
If you have any questions regarding my images, purchasing images, my site, or simply wish to send me a message, then please send me an email via the form below.
</p>
<br />
<div class="contact">
<form method="post" action="mailer.php" />
Name: <input id="name" type="text" class="inputbox" />
E-mail:<input id="email" type="text" class="inputbox" />
<br />
Message<br />
<textarea class="textarea" id="message" cols="1" rows="1"></textarea>
<br />
</div>
<div style="text-align: right;">
Enter the code shown in the image:<br />
<input class="inputboxsmall" type="text" name="protectwebformcode" value="" /><img src="http://protectwebform.com/image/22356/" alt="protectwebform" width="35px" height="20px" />
<input class="select" type="submit" value="Add" />
</div>
Page in question is;
http://www.afowler.co.uk/contact.php
Im sure it used to work :/