" /> " /> " /> "> "> ">
I need to collect information from a large number of people.
Step 1: Prepare your computer account with AMS service.
Step 2: Create a Web form and create a database to hold the data from the form. Remember, the database field names must be the same names you are using in the form. The database can have more fields than are in your form, but each element of the form must have a corresponding field in the database with the same name.
Step 3: Write the ColdFusion scripts that will process the data from the form. There is an application.cfm file for security, a script that will take the data from the form and put it into the database (populate the database), and a third script that will display the contents of the database.
The script that populates the database is called update.cfm and can look like this:
The script that displays the database contents is called show.cfm and can look like this:
Step 4: Put my web form on a web page and ask folks to fill it out.
Step 5: When people click submit, the "action" variable in the form tag calls update.cfm. Update.cfm takes the data from the form and puts it into the database. The form tag looks like:
Data Checking: I want to make sure the name and age fields are not blank and that what they've put as their age is, in fact, numeric between 5 and 55. I perform these validations in the form by adding a hidden field to each field that I want to test. For example, to make sure the name field is not blank I add a second input tag:
<input type="text" name="name">
The following input tags will verify that the age field is not blank and is numeric between 15 and 55:
<input type="hidden" name="age_required" value="Please
enter your age">
ColdFusion has seven basic validation rules:
Step 6: I want to display the contents of the database on a Web page. The script that does that is called show.cfm.
Step 7: To perform data analysis, I will import this Microsoft Access database into SAS or SPSS. If you need assistance with this step, the ITS Statistical Support Web site is available. In addition, consulting is provided .
To submit questions or comments regarding this page, use the online Comment Form.
Send questions or comments regarding this page to ">. Send computing questions to the ITS Help Desk or call (512) 475-9400.