Forms can be used for a variety of things on your website...of course, forms are mainly used to gather information from your visitors. Gathering information necessary to accept a payment online is a very common use of a form. Forms are also used just for demographic purposes. An HTML Form is part of a web page that includes boxes where readers can enter information to be sent to you via e-mail. In order to have a form that will work on your website, you must first make sure that your webhosting service supports forms. Simply e-mail the webhosts webmaster and ask if they support forms, and if there are special directions for you to follow to set it up...there will be. I recommend getting these directions first...before you go any further. Once you have the directions for forms from your webhosts webmaster, you can write your form. Every form starts with the <form> tag. This tag can be located anywhere in your HTML document. The form tag has two very important attributes....Method and Action. So, our form would start like this: Here is a complete example form. This form is used on my site to collect payment information...it can be copied and used, but you will have to change the information on the form to suit your needs, and have the form delivered to you, instead of to me: <form method=POST action="https://server6.hypermart.net/kwilliams/cgi-bin/FormMail.cgi"> <input type="Hidden" name="recipient" value="kwilliams@imsday.com"> <input type="Hidden" name="subject" value="Customer Check"> Enter Your E-Mail Address<br> *lt;input type="Text" name="email" align="LEFT" size="30" maxlength="50"> <p>Enter Your Name (as shown on your check)<br> <input type="Text" name="realname" align="LEFT" size="30" maxlength="50"> <p>Enter Your Address<br> <input type="Text" name="custaddress" align="LEFT" size="30" maxlength="100"> <br><input type="Text" name="custaddress2" align="LEFT" size="30" maxlength="100"> <p>Enter Your Phone Number<br> <input type="Text" name="custphone" align="LEFT" size="30" maxlength="30"> <p>Enter Your Check Number<br> <input type="Text" name="checknumber" align="LEFT" size="30" maxlength="10"> <p>Routing Number (9 numbers on bottom left of check between symbols)<br><input type="Text" name="routingnumber" align="LEFT" size="30" maxlength="9"> <p>Enter Your Bank's Name<br><input type="Text" name="bank" align="LEFT" size="30" maxlength="50"> <p>Enter Your Bank's Mailing Address<br> <input type="Text" name="bankadd1" align="LEFT" size="30" maxlength="50"> <br><input type="Text" name="bankadd2" align="LEFT" size="30" maxlength="50"> <p>Your Bank's Phone Number<br> <input type="Text" name="bankphone" align="LEFT" size="30" maxlength="12"> <p>Enter Your Account Number<br> <input type="Text" name="accountnumber" align="LEFT" size="30" maxlength="50"> <p>I authorize K. Williams Resources to draft a one time payment for (amount of your check)<br>$<input type="Text" name="amount" align="LEFT" size="10" maxlength="10"></center> <p>Please select the item(s) you are ordering: <p><br><input type="Checkbox" name="ezinecourse" align="left"> Ezine Publishing Course - $30.00 <p><input type="Checkbox" name="ezinee-book" align="LEFT"> Ezine Publishing E-Book (no consultation or support) - $10.00 <p><input type="Checkbox" name="marketingbook" align="LEFT"> Premium Results: Your Guide To Online Marketing (e-book) - $10.00 <p><input type="Checkbox" name="advertising" align="left"> Ezine Advertising (contact kwilliams@imsday.com for rates) <input type="Hidden" name="redirect" value="https://server6.hypermart.net/kwilliams/thanks.html"> <p><input type="Submit" name="submit" value="Submit" align="BOTTOM"> </form> With the above HTML code, my form appears as this: When submitted, the information that would come to my e-mail would look like this. Please remember that the information here is not real...this is just an example: Below is the result of your feedback form. It was submitted by
Kelley Williams (kwilliams@imsday.com) on Friday, November 27, 1998 at 16:03:13
As I stated earlier..you are free to copy this form for your own site, but you will have to change the "action" of the form, and various other fields, to customize the form with your information, and to gather the information you want to gather from your visitors. Accepting PaymentContents |