What's
New
Doll
Makers
Room
Makers
Puzzle
Makers
Roiworld Stardoll Smilies Links

Back to Free Shopping Cart

HTML Forms


This script is transcribed from MyPaySystems PRO setup documentation (a pdf file), no online copy was easily available so I have mirrored this document here for easy reference

Table of contents
  1. INTRODUCTION
  2. BACKGROUND INFORMATION
    1. HTML Forms
    2. Form Submission
  3. PREREQUISITES
  4. SETUP
    1. Overview
    2. Line-by-Line Analysis
  5. COMMON APPLICATIONS
    1. Custom Shopping Cart
    2. In-House Database of Customers
    3. Advanced Shipping or Taxes
    4. Numerous Product Variations
    5. Any Application with Numerous Possible Product Prices
  6. TROUBLESHOOTING
  7. GLOSSARY
  8. APPENDICES
  9. APPENDIX A: Input variables list
  10. APPENDIX B: Output variables list
  11. APPENDIX C: HTML source


2.1. HTML Forms

HTML forms are the primary means of getting input from a user on the Internet. As such, understanding how HTML forms work is essential to understanding how myPaySystems-Pro works. Getting information from a consumer is how the merchant collects information about what product the consumer would like, and the myPaySystems.com payment site uses the same method to receive information from the merchant.

<HTML>
<HEAD></HEAD>
<BODY>
<FORM method=”POST“ action=”http://www.mypaysystems.com/process.asp”>
<INPUT type=”text” name=”test”>
</FORM>
</BODY>
</HTML>

This is a basic HTML form. This HTML document has the standard tags <HTML>, <HEAD> and <BODY>, as well as their closing tags, showing it to be an HTML document. Of interest is everything between the <FORM> tags. The <FORM> tag has two properties that are essential in any form.

These essential properties are the action property and the method property. These properties determine where and how the information contained in the form will be submitted. The action property contains the URL of the web page that will process the information contained in the form. In most cases, this is a script that will do some sort of evaluation using the data the user typed into the form. Note that the user will be brought to this URL just like a regular HTML link. The second important property is the method property. This property of the <FORM> tag determines how the information is sent to the URL specified by the action property. This property is either GET or POST. The difference is explained in the second part of this section. The <INPUT> tag specifies a type of input field that will be displayed in the web page. For instance, an <INPUT> tag with the property type set to text tells the web browser to display a simple text box, such as the one shown in figure 1. The user can then use this text box to enter information into the form. The second important property of the <INPUT> tag is the name property. This property names the field (designated by the <INPUT> tag), which the URL in the action property of the <FORM> tag can use to reference the information that the user has entered into the field. There are numerous types of input fields allowed in a form, but listing and explaining them all is beyond the scope of this document.



Next, there is a special <INPUT> tag of type submit, which is essential for a form to be submitted. An <INPUT> tag of type submit translates to a button in a web page. The text written on the button is what is specified in the value property of this tag. When a user clicks on this button, the form will be submitted to the URL specified in the action property of the <FORM> tag. Lastly, one more type of <INPUT> tag deserves mention. This is the <INPUT> tag of type hidden. This type of field is not shown on a web page; it is there strictly to store information that should be sent to the processing web page. As a consequence, the information in this input field cannot be modified. The information in an input tag is stored in the value property. Following is he HTML code for a hidden field whose value is “some hidden value”. This will become important in the step-by-step example illustrated in section 4, Setup.

<INPUT type=”hidden” value=”some hidden value”>





About     Privacy Policy     Hosting by Web Hosting Canada

Except where otherwise noted, this site is licensed under a Creative Commons License



contact us: elouai@gmail.com
©2003-2008 eLouai.com, All rights reserved