Opinion feedback table created using PHP

Source: Internet
Author: User
An opinion feedback table made using PHP is an opinion feedback table made using PHP. It can also be used for online mail programs with slight modifications. it is mainly used for visitors to fill out forms and send them to the administrator's mailbox after processing in PHP, this is an opinion feedback form made with PHP. It can also be used for sending emails to the Internet with slight modifications. it mainly allows visitors to fill out forms and send them to the administrator's mailbox after processing them with PHP, send a confirmation letter to the visitor's mailbox.

About. php
-------------------------


Feedback Form



$ Adminmail = "admin@acme.oso.com.cn"; # administrator mailbox
$ Pagename = "Acme"; # home page name
$ Pageline = "http://acme.oso.com.cn"; # home address

# Administrator Letter content
If ($ formno1! = "") And ($ formno4! = "") And ($ formno11! = "")){

$ Email = $ formno4; # client E-mail
$ Sender = $ formno1; # sender
$ Nowtime = date ("Y, m, d, H, I ");


$ Tmpfilename = tempnam ("./tmp", "dm ");
$ Fp = fopen ($ tmpfilename, "w ");

Fwrite ($ fp, "From:". $ Email. "n ");
Fwrite ($ fp, "Subject:". $ sender. "<". $ pagename. "-feedback form> nn ");
Fwrite ($ fp, "Courier:". $ sender. "n sending IP:". $ REMOTE_ADDR. "n sending time:". $ nowtime. "nn ");
Fwrite ($ fp, "feedback form details: n ---------------------------------------------------------- n ");
Fwrite ($ fp, "name :". $ formno1. "n gender :". $ formno2. "n age :". $ formno3. "nE-mail :". $ formno4. "n unit :". $ formno5. "n contact address :". $ formno6. "n Zip code :". $ formno7. "n :". $ formno8. "n Fax :". $ formno9. "n URL :". $ formno10. "n suggestion :". $ formno11. "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 );

# Incoming mail content;
$ Tmpfilename1 = tempnam ("./tmp", "dm ");
$ Fp = fopen ($ tmpfilename1, "w ");

Fwrite ($ fp, "From:". $ adminmail. "n ");
Fwrite ($ fp, "Subject: you entered in [". $ pagename. "] <意见反馈表> Nn ");
Fwrite ($ fp, "***** this message is an automatic reply letter. please do not reply. We apologize for the inconvenience. * *** Nn ---------------------------------------------------------- n thank you very much for entering the feedback form in [". $ pagename! N The following is the details you fill in ". $ nowtime.", please confirm: n ------------------------------------------------------ n ");
Fwrite ($ fp, "name :". $ formno1. "n gender :". $ formno2. "n age :". $ formno3. "nE-mail :". $ formno4. "n unit :". $ formno5. "n contact address :". $ formno6. "n Zip code :". $ formno7. "n :". $ formno8. "n Fax :". $ formno9. "n URL :". $ formno10. "n suggestion :". $ formno11. "n ------------------------------------------------------ n ". $ pagename. ":". $ pageline. "nE-mail :". $ adminmail );
Fclose ($ fp );

$ Execstr = "cat". $ tmpfilename1. "|/usr/sbin/sendmail". $ Email;
Exec ($ execstr );

# The Confirmation Page starts;
Echo"


*** Thank you very much for entering the feedback form at $ pagename! ***

The following are the details you have entered:

Name:$ Formno1

Gender:$ Formanganese

Age:$ Formno3

E-mail:$ Formno4

Work Unit:$ Formno5

Contact address:$ Formno6

Zip code:$ Formno7

Tel:$ Formno8

Fax:$ Formno9

URL:$ Formno10

Suggestions:$ Formno11


Thank you !!!
 

$ Pagename: $ pageline


";
# The Confirmation Page ends;

} Else {
?>

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.