<form action="/cgi/feedback" method="POST">
_myemail_
Your eMail address (e.g.
abc@mycompany.de). New:< If
the contents (value) of the field ends on .csv,
not a Mail, but a CSV file (colon
separated values) will be produced.
_subject_
The Subject of the Mails,
which are produced from this page. (e.g.
order)
_confirm_
The file name of the
acknowledgement page, on which the user can
check its inputs again.
_thanks_
The URL or the file name
of the final page. You can indicate alternatively
an absolute path, a logical or a complete URL
including server designation.
The GCI SCRIPT detects independently, over which
concerns itself it with your specification, and
sends to the WWW Browser a Redirect on this page.
(Examples:
http://www.myserver.de/MailformOK.html,
or simply /MailformOK.html.
Alternatively also a local file name can be e.g.
/home/www/conf/thanks.html.)
_myself_
The complete URL or the file
name of the page. This specification is necessary
to be able to output the appropriate error
messages for the obligation fields.
It can be also omitted, if the page is in the
DOCUMENT ROOT
(/ home/www/data) directory.
Then the GCI SCRIPT finds the page independently through
the environment variable of HTTP_REFERER.
(Examples:
file:/home/www/data/Mailform.html.)
<input type=text name="Street" size=20 maxlength=40>
results in the Mail an entry a form of:
Street: <input street name>
If you should insist on the fact that the user absolutely fills out a field, then you place to the field name an M_ in front (M_ is for mandatory). For the above example it looks like this:
<input type=text name="M_Street" size=20 maxlength=40>
The Mail entry remains the same as above!
In order to be able to indicate to the user that he/she forgot
something, an error message can be adjusted in the form.
This occurs as follows:
<!---ERROR M_Name
Now here can be written quite normal HTML code
e.g. You forgot to fill out the name field!
-->
This text will appear only in the event of an error in exactly
the place in which it is located in the form. Replace M_Name
with that variable name, to which the error message applies.
If you do not like to indicate an error message for each
necessary field, then you simply omit the variable name.
The error message then is displayed, as soon as (any) a field
remains empty which however must be filled out.
If there is an input field, which carries the name Email (consider
the exact way of writing!) then this input becomes related as
senders of the Mail.
If you like that fields remain filled out, if the user forgets to fill out a field then you must still insert VALUE = " " in the INPUT day, behind the NAME attribute. An example to clarify:
<INPUT NAME="Surname" VALUE="">
Fields, which fulfill this criterion, keep their contents,
the others are reset
Try out absolutely also for this the example form!
#!/usr/local/bin/perl
(on UNIX machines to determine with: whereis perl)
##
## Config
##
$MAILER='/usr/sbin/sendmail -t';
Please enter here the complete path! (on
UNIX maschines to determine with:
whereis sendmail)
##
## Config
##
$DOCUMENTROOT='/home/www/data/';
Please enter here the complete path!