SWNM On-Line Form Mail:
You can put an on-line form as part of your webpage. The program is CGI (Common Gateway Interface), which is an interactive type program that runs on our server. Form mail allows you to create a form that allows input from the user. That input is than gathered and sent to you via email. This particular program also allows for a custom response stored in a seperate file. If you choose not to send a response, then you only need to modify your html (web language) program. All configeration information in right there. First we will show you the code that needs to be added in your html, and then a working form. Feel free to copy and paste any of this program, just be sure to change the values as noted. Command lines in the code section are copy/pastable.
<FORM METHOD="POST" ACTION="http://www.swnm.com/cgi-bin/bnbform.pl">
This line always remains the same
<INPUT TYPE="hidden" NAME="sendto" VALUE="update@swnm.com">
Change the colored value to your email address; the address you want the information gathered on the form to be sent to.
*******This is where your will insert the form input code. You can use standard text input, radio buttons, checkboxes, all the standard form tools.
<b>E-Mail Address:</b><br>
<INPUT NAME="submit_by" SIZE=30><br>
You should always include as part of your input something similar to the above. The program uses the submit_by variable to send responses. Other input variables can be named as you see fit.
<INPUT TYPE="submit" VALUE="Submit"> <INPUT TYPE="reset" VALUE="Clear">
Your need this line after all your input. You can change the value, but the input type must remain the same.
<!-- SCRIPT CONFIGURATION SECTION -->
Just a comment, but not a bad idea to include it anyway.
<INPUT TYPE="HIDDEN" NAME="data_order"
VALUE="Name,submit_by,message">
The colored section is a list of the variables you used in your input, seperated by commas, and the order they will appear on the email sent to you.
<INPUT TYPE="HIDDEN" NAME="submit_to" VALUE="info@swnm.com">
Change the colored address to your email.
<input type="hidden" name="automessage" value="/userpages/user_name/your_file_name">
Use this only if you want a response sent to the sender. user name is your directory name. Your_file_name is the name you give to the text file that contains the text of your automated response.
<INPUT TYPE="HIDDEN" NAME="form_id" VALUE="Feedback">
Include this line. Change the colored section to your form name.
<INPUT TYPE="HIDDEN" NAME="ok_url"
VALUE="http://www.swnm.com/formok.htm">
<INPUT TYPE="HIDDEN" NAME="not_ok_url"
VALUE="http://www.swnm.com/cgi-bin/oops.html">
I recommend just leaving this as is. When a form is sent, a Thank you page with the SWNM logo will come up. If there is a problem, an error page will come up. If you wish a custom response page, then change the red portion of the code to user_name/file_name, where user name is your directory, and file name is the html file you wish to send users to.
<!-- END OF SCRIPT CONFIGURATION SECTION -->
Just another comment.
</form>
You need this one to end the form.
Now a working example:
Services |
Setup |
Websites |
Policies |
Updates |
Downloads |
Web Mail |
Acct. Info |
Lookup |
Tips |
Mike's Sites |
Search |
Help |
Home
Designed by Dave Johnson / dave@swnm.com / revised 10:23 PM 4/29/00
