Quiza puedan revisarla. de antemano gracias.
Código PHP:
<body>
<? if ($email=="") { ?>
<p>We welcome your questions or feedback. Please feel free to
contact us any time:</p>
<p>Your details</p>
<form name="form1" id="form1" method="post" action="contact.php">
<p><b>Name</b>:</p>
<p>
<input type="text" name="first" size="40" />
</p>
<p><b>Email:</b></p>
<p>
<input type="text" name="email" size="40" />
</p>
<p><strong>Subject:</strong></p>
<p>
<input name="sub" type="text" size="40" maxlength="100" />
</p>
<p><b>Comments</b>:<br />
<textarea cols="50" rows="5" name="comments">
</textarea>
</p>
<p><strong>Spam Control: </strong></p>
<p><img src="http://www.aaa.com/images/spmgall.jpg" alt="" width="100" height="22" /></p>
<p>Write the code</p>
<p>
<input type="text" name="spamcontrol" />
</p>
<p><b>
<input name="submit" type="submit" value="Send Form" />
<input name="reset" type="reset" value="Clear Page" />
</b> </p>
</form>
<? } else {
if ($spamcontrol == "32854") {
$to = "[email protected], $email";
$head = "Contact Request From www.aaa.com";
$body="
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<title>Contact Request From aaa.com</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
</head>
<body>";
$body.=" <p>Incoming request from www.aaa.com</p>
<table width='100%' border='0'>
<tr>
<td width='23%'>Nombre:</td>
<td width='73%'>".$first."</td>
</tr>
<tr>
<td>email:</td>
<td>".$email."</td>
</tr>
<tr>
<td>Subject:</td>
<td>".$sub."</td>
</tr>
<tr>
<td>Comments:</td>
<td>".$comments."</td>
</tr>
</table>
<p>Thanks-<br>
<a href='http://www.aaa.com'>http://www.aaa.com</a><br>
</p>
<p><br>
</body>
</html>";
$headers .= "From: asdf.com <[email protected]> \n";
$headers .= "X-Sender: <[email protected]>\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <[email protected]>\n";
//Uncomment this to send html format
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
//$headers .= "cc: [email protected]\n"; // CC to
//$headers .= "bcc: [email protected]"; // BCCs to, separete multiple with commas [email protected], [email protected]
mail($to, $head , $body ,$headers);
//echo "<script>document.location.href='submitdone.php?e=".$email."&n=".$first."'</script>";
?>
<p>Thanks <font color="#FFFFCE"><b><? echo"$n"?></b></font>
for your comment. We will answer to you if it´s
necesary to <font color="#FFFFCE"><b><? echo"$e"?></b></font>
check if this email is correct, if not, back and correct.</p>
<h1><strong>Thanks.</strong></h1>
<?
}else{
?>
The Spam Control Code does not match, please go back and try again.
<? ;}
;}
?>
</body>