Hi guys
I am hoping you could give mesome help and tell me what I have to change in my email contact form.
I get this msg when I try my contact form.
The server encountered an unexpected condition which prevented it from fulfilling the request.
The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log.
the server seems to be apache.
my code for the form is this:
<form name="form1" method="post" action="mail_t.php">
<input type="text" name="user" size="25">
<input type="text" name="emailaddress" size="25">
<textarea cols="10" rows="4" name="comments"></textarea>
<input type="submit" value="Send">
</form>
and my mail_t.php looks like this:
(the email adress removed as its not mine)
<?
$to = "xxx@xxxx.com";
$subject = "Email from website contact form";
$boundary = uniqid("");
$headers = "From: $from";
$body = "
Name :$user
Email :$emailaddress
Comment :$comments
";
if (mail($to, $subject, $body,$headers)) {
print( "Thank you for emailing us.Your file has been sent succesfully");
?>
<meta http-equiv=refresh content="1;URL=http://www.peacefulsangha.com/files/CUTH.html">
<?
}
else {
print( "Error: Unknown error ocurred. The message could not be sent. Please try again later.\n");
}
?>
the link to the page is here:
http://www.peacefulseasangha.com/sampleforliz/files/CU.html
I am lost as I dont really know php, this script has worked before on other servers.
thanks
sami