This is a use of PHP production feedback form, a little modification can also be used to send the online program, the main is to let visitors fill out the form, the use of PHP processing to send to the administrator's mailbox, and to the visitor mailbox sent a confirmation letter.
about.php
-------------------------
<title> Feedback Form </title>
<body>
<?php
$adminmail = "admin@etoow.com"; #治理员信箱
$pagename = "ACME"; #主页名称
$pageline = "http://etoow.com"; #主页地址
#治理员信件内容
if ($formno 1!= "") and ($formno 4!= "") and ($formno 11!= "")) {
$Email = $formno 4; #来访者E-mail
$sender = $formno 1; #送信人
$nowtime =date ("Y year M month D Day h time I minute");
$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 Send IP: ". $REMOTE _addr." N Sending time: ". $nowtime." nn ");
Fwrite ($fp, "Feedback table specific content: 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 Zip Code: ". $formno 7." N Telephone: ". $formno 8." N Fax: ". $formno 9." N URL: ". $formno 10." N comments suggested: ". $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 < feedback form >nn ");
Fwrite ($FP, "* * * * This letter for automatic reply letter, please do not reply. We apologize for the inconvenience caused to you. NN------------------------------------------------------n Thank you very much for [". $pagename."] Fill out Feedback Form! n Below you are in ". $nowtime." Fill in the specific content, 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 Zip Code: ". $formno 7." N Telephone: ". $formno 8." N Fax: ". $formno 9." N URL: ". $formno 10." N comments suggested: ". $formno 11." n------------------------------------------------------n ". $pagename." : ". $pageline." Ne-mail: ". $adminmail);
Fclose ($FP);
$execstr = "Cat". $tmpfilename 1. "| /usr/sbin/sendmail ". $Email;
EXEC ($EXECSTR);
#确认页开始;
echo "
<style type=text/css><style>
A {font-size:9pt}
a:link {COLOR: #006666;}
a:visited {COLOR: #006666;}
a:hover {COLOR: #ff0000; Text-decoration:underline}
TD {font-size:9pt}
INPUT {font-size:9pt}
</style>
<br><p Align=center><font size=4><b>*** Thank you very much for <a href= $pageline > $pagename </a> Fill out Feedback Form! </b></font></p> below is the specific content you fill out:<b> name:</b> $formno 1<br>
<b> Sex:</b> $formno 2<br>