So, I decided to share some thing with you, and I am continuing.
You can probably find better script if you google, but if you are looking for light working contact form, this is for you.
You can probably find better script if you google, but if you are looking for light working contact form, this is for you.
PHP Code
<?php
PHP Code:
<?php
if($_POST["email"]<>'') {
$ToEmail = '[email protected]'; //Put your email here
$EmailSubject = 'CONTACT'; // Title of email
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "<b>Name</b>: ".$_POST["name"].""."<br>"; //name
$MESSAGE_BODY .= "<b>Email address:</b> ".$_POST["email"].""."<br>"; //from
$MESSAGE_BODY .= "<b>Question:</b> ".nl2br($_POST["comment"]).""."<br>"; //text
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
Message sent. <!--Message which is printed if the email has been sent. You can change it or delete it-->
<?php
} else {
?>
<form action="" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">Name:</td>
<td width="71%"><input name="name" type="text" id="name" size="32"></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">Question:</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form>
<?php
};
?>