contact form refuses to work, can anyone help?
Posted: Sun Sep 17, 2006 1:49 pm
feyd | Please use
and here is the code from the html file:
I use the exact same code on many sites but this new site it just doesnt work with it. Does anyone have any idea what could be the reason?
Trying to send to an email address on the domain.
I receive no email, no error msg, nothing.
Thanks.
Sami
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi I want to make a contact form but I am having some trouble.
I always use the same code for a simple form, but on a new site with a new host, it doesnt work.
I have no idea why. I turn CGI on already.
here is the code.
PHP file:Code: Select all
<?
$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.peacefulseasangha.com/sampleforliz/files/CUT H.html">
<?
}
else {
print( "Error: Unknown error ocurred. The message could not be sent. Please try again later.\n");
}
?>Code: Select all
...
Contact FORM
</div>
<div id="cu">
Please use the form below to send us email. Thank You.
<div id="flabels">
<br>Name:
<br>Email:
<br>Comments:
</div>
<div id="fitems">
<br>
<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>
</div> ...Trying to send to an email address on the domain.
I receive no email, no error msg, nothing.
Thanks.
Sami
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]