表单:form.php3
include("include/common.inc");
$title = "Feedback";
include("include/header.inc");
?>
include("include/footer.inc");
?>
处理表单:sendfdbk.php3
include("include/common.inc");
$title = "Feedback";
include("include/header.inc");
if ( $name == "" )
{
// 现在我很讨厌匿名的留言!
echo "Duh ? How come you are anonymous?";
}
elseif ($name == "Your name")
{
// 这个浏览者真是不想透露姓名啊!
echo "Hello ?
Your name is supposed to be replaced with
your actual name!";
}
else
{
// 输出一段礼貌的感谢语
echo "
Hello, $name.
Thank you for your feedback. It is greatly appreciated.
Thanking you
$MyName
$MyEmailLink
";
// 最后mail出去
mail($MyEmail, "Feedback.","
Name : $name
E-mail : $email
Comment : $comment
");
}
include("include/footer.inc");
?>