|Summary||Provides a couple of forms for collecting information|
|Author(s)||Ian Singer with help from Jerry Johnson|
|Homepage||Collecting Information (This page)|
|Mod Support||TNG Forums|
|Min TNG V||8.0.0|
|Max TNG V||8.0.1|
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 http://www.iansinger.com/submit.htm
I started off with two HTML forms that display similar to the ones attached:
- children.htm and
but then the source code was modified as explained below.
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:
- 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("firstname.lastname@example.org", "Name of the html form", $message, "From: Name of the html // form <email@example.com>"); // the sending address must have rights to send mail("firstname.lastname@example.org", "children.htm from web", $message, "From: Supply Information on Children <email@example.com>"); // sends the user here after the php is finished sending the data header("Location: http://www.iansinger.com/submit.htm");
- 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&1.com
- 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