<%
'---------------------------------------------------------------------------
' Program function: Print all values entered by Request.Form
'---------------------------------------------------------------------------
Response.Write FormData ()
function FormData ()
Dim Llngmaxfieldindex
Dim Llngfieldindex
Dim Llngmaxvalueindex
Dim Llngvalueindex
Dim Lstrdebug
' Count Form
Llngmaxfieldindex = Request.Form.Count
' Let user know if Form does not exist
If Llngmaxfieldindex = 0 Then
FormData = "Form data is empty."
Exit function
End If
' Begin building a list of all Form
Lstrdebug = "<OL>"
' Loop through each Form
For llngfieldindex = 1 to Llngmaxfieldindex
Lstrdebug = lstrdebug & "<LI>" & Server.HTMLEncode (Request.Form.Key (Llngfieldindex))
' Count the values
Llngmaxvalueindex = Request.Form (Llngfieldindex). Count
' If the Field doesn ' t have multiple values ...
If Llngmaxvalueindex = 1 Then
Lstrdebug = lstrdebug & "="
Lstrdebug = Lstrdebug & Server.HTMLEncode (Request.Form.Item (Llngfieldindex))
' Else Loop through each value
Else
Lstrdebug = lstrdebug & "<OL>"
For llngvalueindex = 1 to Llngmaxvalueindex
Lstrdebug = lstrdebug & "<LI>"
Lstrdebug = Lstrdebug & Server.HTMLEncode (Request.Form (Llngfieldindex) (Llngvalueindex))
Lstrdebug = lstrdebug & "</LI>"
Next
Lstrdebug = lstrdebug & "</OL>"
End If
Lstrdebug = lstrdebug & "</LI>"
Next
Lstrdebug = lstrdebug & "</OL>"
' Return the data
FormData = Lstrdebug
End Function
%>
<%
'-------------------------------------------------------------------------
' function function: output all input request.querystring values, for debugging!
'-------------------------------------------------------------------------
Response.Write Querystringdata ()
function Querystringdata ()
Dim Llngmaxfieldindex
Dim Llngfieldindex
Dim Llngmaxvalueindex
Dim Llngvalueindex
Dim Lstrdebug
' Count querystring
Llngmaxfieldindex = Request.QueryString.Count
' Let user know if QueryString does not exist
If Llngmaxfieldindex = 0 Then
Querystringdata = "QueryString data is empty."
Exit function
End If
' Begin building a list of all QueryString
Lstrdebug = "<OL>"
' Loop through each querystring
For llngfieldindex = 1 to Llngmaxfieldindex
Lstrdebug = lstrdebug & "<LI>" & Server.HTMLEncode (Request.QueryString.Key (Llngfieldindex))
' Count the values
Llngmaxvalueindex = Request.QueryString (Llngfieldindex). Count
' If the Field doesn ' t have multiple values ...
If Llngmaxvalueindex = 1 Then
Lstrdebug = lstrdebug & "="
Lstrdebug = Lstrdebug & Server.HTMLEncode (Request.QueryString.Item (Llngfieldindex))
' Else Loop through each value
Else
Lstrdebug = lstrdebug & "<OL>"
For llngvalueindex = 1 to Llngmaxvalueindex
Lstrdebug = lstrdebug & "<LI>"
Lstrdebug = Lstrdebug & Server.HTMLEncode (Request.QueryString (Llngfieldindex) (Llngvalueindex))
Lstrdebug = lstrdebug & "</LI>"
Next
Lstrdebug = lstrdebug & "</OL>"
End If
Lstrdebug = lstrdebug & "</LI>"
Next
Lstrdebug = lstrdebug & "</OL>"
' Return the data
Querystringdata = Lstrdebug
End Function
%>