This is a php-made feedback form, a little modification can also be used to send a program on the Internet, mainly to let visitors fill out the form, with PHP processing sent to the administrator's mailbox, and send a confirmation letter to the visitor's mailbox.
about.php
-------------------------
<title>Opinion Feedback Form</title>
$adminmail = "admin@acme.oso.com.cn"; #管理员信箱
$pagename = "ACME"; #主页名称
$pageline = "http://acme.oso.com.cn"; #主页地址
#管理员信件内容
if ($formno 1!= "") and ($formno 4!= "") and ($formno 11!= "")) {
$Email = $formno 4; #来访者E-mail
$sender = $formno 1; #送信人
$nowtime =date ("Y years m D Day h i min");
$tmpfilename = Tempnam ("./tmp", "DM");
$fp = fopen ($tmpfilename, "w");
Fwrite ($FP, "from:". $Email. " n ");
Fwrite ($FP, "Subject:". $sender. "<". $pagename. " -Feedback Form >nn ");
Fwrite ($fp, "Messenger:" $sender. " N Sending IP: ". $REMOTE _addr." N Sending time: ". $nowtime." nn ");
Fwrite ($fp, "Feedback table details: n------------------------------------------------------n");
Fwrite ($fp, "Name:". $formno 1. " N Sex: ". $formno 2." N Age: ". $formno 3." Ne-mail: ". $formno 4." N Work unit: ". $formno 5." N Contact Address: ". $formno 6." N Post code: ". $formno 7." N Tel: ". $formno 8." N Fax: ". $formno 9." N URL: ". $formno 10." N Suggestion: ". $formno 11." n------------------------------------------------------n ");
Fclose ($FP);
$execstr = "Cat". $tmpfilename. "| /usr/sbin/sendmail ". $adminmail;
EXEC ($EXECSTR);
$EXECSTR = "echo $sender $nowtime $REMOTE _addr $REMOTE _host >> mail.log";
EXEC ($EXECSTR);
#来客信件内容;
$tmpfilename 1 = Tempnam ("./tmp", "DM");
$fp = fopen ($tmpfilename 1, "w");
Fwrite ($FP, "from:". $adminmail. " n ");
Fwrite ($FP, "Subject: You are in [". $pagename. "] Fill in the <意见反馈表> nn ");
Fwrite ($FP, "* * * * This letter is automatic reply letter, do not reply. We apologize for the inconvenience. NN------------------------------------------------------n Thank you very much in [". $pagename."] Fill in the Feedback form! n Below is your ". $nowtime." Fill in the details, please confirm: N------------------------------------------------------n ");
Fwrite ($fp, "Name:". $formno 1. " N Sex: ". $formno 2." N Age: ". $formno 3." Ne-mail: ". $formno 4." N Work unit: ". $formno 5." N Contact Address: ". $formno 6." N Post code: ". $formno 7." N Tel: ". $formno 8." N Fax: ". $formno 9." N URL: ". $formno 10." N Suggestion: ". $formno 11." n------------------------------------------------------n ". $pagename." : ". $pageline." Ne-mail: ". $adminmail);
Fclose ($FP);
$execstr = "Cat". $tmpfilename 1. "| /usr/sbin/sendmail ". $Email;
EXEC ($EXECSTR);
#确认页开始;
echo "
Thank you very much for filling in the feedback form in $pagename! ***
Here's what you fill in:
Name:$formno 1
Gender:$formno 2
Age:$formno 3
e-mail:$formno 4
Work Unit:$formno 5
Contact Address:$formno 6
ZIP Code:$formno 7
Tel:$formno 8
Fax:$formno 9
Website:$formno 10
comments and suggestions:$formno 11
Thank you!!!
$pagename: $pageline
";
#确认页结束;
} else {
?>
Opinion Feedback Form
}
?>