Feedback form made with PHP

Source: Internet
Author: User
Keywords Feedback form made with PHP
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



       



                    
 
      
     

  }
?>




"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.