HTML contact form

RuwinRTY

Member
Dec 16, 2007
13,422
129
0
32
With My Angel
try dz machn

<form>
<table width="456" border="0" cellpadding="0" cellspacing="0" bgcolor="F7F5F2">
<tr>
<td height="60"><img src="images/tit_18.gif" width="405" height="23" style="margin-left:24px "></td>
</tr>
<tr>
<td height="28" valign="top"><table width="456" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="124" align="right" class="text_1">Your name:</td>
<td width="26"><img src="images/spacer.gif" width="1" height="1"></td>
<td><input name="textfield2" type="text" class="form_1"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="28" valign="top"><table width="456" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="124" align="right" class="text_1">E-mail address:</td>
<td width="26"><img src="images/spacer.gif" width="1" height="1"></td>
<td><input name="textfield22" type="text" class="form_1"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="91" valign="top"><table width="456" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="124" align="right" valign="top" class="text_1" style="padding-top:3px ">Message:</td>
<td width="26"><img src="images/spacer.gif" width="1" height="1"></td>
<td><textarea name="textarea" class="form_2"></textarea></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><input type="image" src="images/reset.gif" style="margin-left:338px "><input type="image" src="images/submit.gif" style="margin-left:29px "></td>
</tr>
</table><!-- -->
</form>
 

RuwinRTY

Member
Dec 16, 2007
13,422
129
0
32
With My Angel
hari giye neha ban

Code for sendeail.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>

<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->

<?php

$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];


if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}

if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
die ("Use back! ! ");
}

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn ;
$subject = $attn;

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $visitormail\r\n";


mail("YourEmail", $subject, $message, $from);

?>

<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />

Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>

<br /><br />
<a href="contact.php"> Next Page </a>
</p>

</body>
</html>