Collecting Information

From TNG_Wiki
Jump to navigation Jump to search
Collecting Information
Summary Provides a couple of forms for collecting information
Validation {{{mod_validation}}}
Mod Updated {{{mod_last_update}}}
Download link
Download stats {{{download_stats}}}
Author(s) Ian Singer with help from Jerry Johnson
Homepage Collecting Information (This page)
Mod Support TNG Forums
Contact Developer {{{mod_contact}}}
Latest Mod 8.1
Min TNG V 8.0.0
Max TNG V 8.0.1
Files modified
Related Mods


The following is a process for collecting information provided by Ian Singer which was developed with help from Jerry Johnson.

The two forms can be seen in action at

Note: The user will also have access to the privacy policy from the footnote at the bottom of the page.

HTML Forms

I started off with two HTML forms that display similar to the ones attached:

  • children.htm and
  • self.htm

but then the source code was modified as explained below.

Processing Files

Then following instructions from Jerry Johnson the FORM tag in it was changed to <form action="xxxx.php" method="post"> and the php routine was added to the html code so that the xxxx.php is the name of the php file that collects the information from the html form and actually e-mails it. In my case I called the files:

  • processself.php to act with self.htm and then there was another version called
  • processchildren to work with children.htm.

So the htm collects it and passes on to the php for sending.

Notes for htm files

In the htm form there are a some things to note:

  • the tag TEXTAREA will collect an unlimited amount of data and that can not be reduced without javascript routines.
  • When it emails there is no line wrapping.
  • A field label like "Child's email" , without the quotes, will actually read as "Child\'s email" , without the quotes, in the email when it is sent.
  • Each field label will send as a separate line in the email

Changes to PHP Files

In the php files change the things marked in these segments and of course replace my e-mail address with yours. Please note that your browser may have wrapped the comment lines below so that they appear on two lines instead of one:

// send it
// the format is mail("", "Name of the html form", $message, "From: Name of the html // form <>");
// the sending address must have rights to send

mail("", "children.htm from web", $message, "From:
Supply Information on Children <>");

// sends the user here after the php is finished sending the data


  • I have been using my email address to send to and also as sending from. Apparently on some servers the sender needs to have rights. That did not appear to be a problem for me though on 1&
  • The php file and the htm or html file need to be in the same folder on the server.
  • Jerry suggested it could also be modified to not send blank lines.
  • There are no anti spam routines and spammers found it within two weeks

Ian Singer