html form
Below is a simple html form, please feel free to use the code. The form send its information to a Perl script that processes the information, you can see full details of the script used with this form on this page.
Please note we can't provide support so don't email asking for help to get it working - you're getting it free aren't you? :-)
This simple form has no field vaidation or error checking. There is a brief description of how the form works at the bottom of the page. The example here works on UNIX, Linux servers etc. It is not designed for Windows servers.
Html Email Form Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <form action="cgi-bin/email_process.cgi" method="post"> <table border="0"> <TR> <TD COLSPAN="2">Please fill in the details below to send us a message</TD> </TR> <TR> <TD colspan="2"> </TD> </TR> <TR> <TD align="left" width="20%"><B>Name:</B></TD> <TD><input type="text" name="fname"></TD> </TR> <TR> <TD align="left" width="20%"><b>Email Address:</b></TD> <TD><input type="text" name="email_add"></TD> </TR> <TR><TD ALIGN=left valign="top" width="20%"><b>Message:</b></TD> <TD><textarea name="email_msg" rows="20" cols="30"></textarea></TD> </TR> <TR> <TD colspan="2"> </TD></TR> <TR><TD colspan="2"><center><INPUT TYPE="submit" VALUE="Send Message"></center></TD> </TR> </TABLE> </form> </BODY> </HTML>
Brief Overview:
The email form takes in 3 parameters, Name, Email and Message: <input type="text" name="fname"> <input type="text" name="email_add"> <textarea name="email_msg" rows="20" cols="30"></textarea>
<form action="cgi-bin/email_process.cgi" method="post">
The line above tells the form where to send the details for processing and the method used to send the information, in this case post.
If you used the method 'get' then information would be sent tagged onto the url like so:
cgi-bin/email_process.cgi?fname=fred&email_add=fred@fredsemailadd.com&email_msg=hi there
|