Web pages are often structured using ASP (Active Server Pages) programming language.
ASP is a Microsoft technology that runs within IIS (Internet Information Services). When a browser requests an ASP file, IIS passes the request to the ASP engine. The ASP engine reads the ASP file, line by line, and executes the scripts in the file. Finally, the ASP file is returned to the browser as plain HTML. ASP provides RESPOND or REQUEST objects which, in addition to other uses, allow the response or request of user queries or data submitted from HTML forms.
Within the processing page of a form, include the following code to append the entered form values to the request data (in addition to writing the submitted form values to an external database or other location):
var sName= Request.Form("Name"); var sCity= Request.Form("City"); var sState= Request.Form("State"); var sZip= Request.Form("Zip"); Response.AppendToLog("&v_1=" + sName); Response.AppendToLog("&v_2=" + sCity); Response.AppendToLog("&v_3=" + sState); Response.AppendToLog("&v_4=" + sZip);
This process would append the form values as defined to the request data for the Form Processing page. Within the log data, the appended values would be available as query strings of the Form Processing page as illustrated below. For example, v_1, v_2, v_3 and v_4 would now be query strings containing the data entered into the appropriate form fields. The syntax described in the example above can be duplicated for any additional form fields and values that you want to capture.
If you want every form field and value to be captured and available for analysis, you can use the following syntax:
var formvalues = Response.Form; Response.AppendToLog(formvalues);
This example would take all form fields present within the HTML along with their respective values and append them as query strings to the log entry for the Form Processing page. It should be noted that this would include any hidden fields present within the form.
The log data would be augmented as detailed in the following table:
Value associated with the NAME query string
Value associated with the CITY query string
Value associated with the STATE query string
Value associated with the ZIP query string