The following example demonstrates a simple HTML form:
<FORM ACTION="insdata.cfm" METHOD="Post">
<!-- Data entry fields -->
<PRE>
First Name: <INPUT TYPE="text" NAME="FirstName">
Last Name: <INPUT TYPE="text" NAME="LastName">
Phone: <INPUT TYPE="text" NAME="Phone">
<INPUT TYPE="Submit" VALUE="Enter Information">
</PRE>
</FORM>
The form has three inputs: FirstName, LastName, and Phone. The user can enter data in these text areas and click the Submit button. When the Submit button is clicked, the form action is carried out, and all inputs (including hidden inputs) are made available to the next page.
Suppose the user enters his first name as "William," his last name as "Gibson," and his phone as "(212)323-9734." When he clicks the Submit button, the form variables shown below are sent to the page:
FirstName=William
LastName=Gibson
Phone=(212)323-9734
This page might display these variables, insert them into the database, or perhaps do both depending on your application.
|