Generic HTML Form Processor is a free program for facilitating data collection with HTML forms. It parses the input from any HTML form, then it automatically creates a MySQL database with one table in it (if not yet there) containing columns that are named according to the variables that were submitted through the HTML form. Thus, Generic HTML Form Processor relieves users from writing a script that parses form input and writes it into a database as well as from setting up a database.
You can use Generic HTML Form Processor for one-page studies, multiple-page studies, with input validation, random assignment of participants to experimental conditions, skip patterns, and password-protection. For details, see the examples and links at the bottom of this page.
The use of the original version of Generic HTML Form Processor is described in: Göritz, A. S. & Birnbaum, M. H. (2005). Generic HTML Form Processor: A versatile PHP Script to save Web-collected data into a MySQL database. Behavior Research Methods, 37(4), 703-710.Thanks to further refinements getting the most recent version of Generic HTML Form Processor to work is so easy that it suffices to read the next paragraph on this page.
Download Generic HTML Form Processor and unzip it.
Modify config.php according to your needs.
Point the action attribute of each HTML form that is part of your study to where Generic HTML Form Processor resides on your webspace:
<form method="post" action="path_to_generic_script/generic.php">Upload config.php, generic.php and HTML form(s) to your webspace.
With multipage studies, paste one line of HTML code within the form tags into each study page except the last. This line defines the hidden variable GHFPvar_next_page and its value, which is the location of the next study page. An example is shown below, in which sample2.htm is the next study page:
<input type="hidden" name="GHFPvar_next_page" value="sample2.htm">
Here is a short troubleshooting checklist in case the script does not run when you put it on your own server:
1. Make sure the Web server functions properly.
2. Make sure PHP is correctly installed and configured.
3. Make sure MySQL is correctly installed and configured.
4. Make sure you have sufficient privileges in MySQL (described in more detail in the BRM article).
Here is the example one-page survey sample.htm.
Here are the three pages of the example multiple-page survey sample1.htm, sample2.htm, and sample3.htm.
Here is the example of a skip pattern with plain HTML.
Here is a tutorial on the use of Generic HTML Form Processor (with input validation, random assignment of participants to experimental conditions, and password-protection) along with example files.
If you use Generic HTML Form Processor in conjunction with the open-source panel management platform to track panelists from the panel into your study, follow these steps: