我的“接触网页”上有以下编码线,我还要以访问者的名义,在他们改用“你网页”时,感谢他们的讲话,但“你”网页只显示“你”与我们联系。
<?
$mailto = info@siteripe.com ; // insert the email address you want the form sent to
$returnpage = thanks.php ; // insert the name of the page/location you want the user to be returned to
$sitename = [siteripe.com] ; // insert the site name here, it will appear in the subject of your email
$name = $_POST[ name ];
$email = $_POST[ email ] ;
$subject = $_POST[ subject ];
$message = $_POST[ message ];
$phone = $_POST[ phone ];
if (!$name) {
print("<strong>Error:</strong> Please provide your name.<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
if (!$email) {
print("<strong>Error:</strong> Please provide an email address.<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
if (!$subject) {
print("<strong>Error:</strong> Please provide a subject.<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
if (!$phone) {
print("<strong>Error:</strong> Please provide a Phone number<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
if (!$message) {
print("<strong>Error:</strong> Please provide a Message<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
if (!eregi("^[a-z0-9]+([-_.]?[a-z0-9])+@[a-z0-9]+([-_.]?[a-z0-9])+.[a-z]{2,4}", $email)){
print("<strong>Error:</strong> this email address is not in a valid format.<br/><br/><a href= javascript:history.go(-1) >Back</a>");
exit;
}
$message = "
$name submitted the following message:
$message
Sender s contact details are as follows:
Name: $name
Phone Number: $phone
Email Address: $email
";
mail($mailto, "$subject", $message, "From: $email");
header("Location: " . $returnpage);
?>
谢谢你,我有以下守则:
<?php echo $_POST["name"]; ?> 增 编for contacting us<br />
增 编