%@ LANGUAGE="VBSCRIPT" %> <% UserName = Request.Form("Surname_ap1") %> <% UserEmail = Request.Form("Contact_Email") %> <% Dim StrFileTemp %> <% Response.Buffer = True%> <% Nbr_of_Personal_Loan_Applicants = Request.Form("Nbr_of_Personal_Loan_Applicants") Additional_Credit_Card_Holder = Request.Form("Additional_Credit_Card_Holder") Apply_Credit_Card = Request.Form("Apply_Credit_Card") Apply_Personal_Loan = Request.Form("Apply_Personal_Loan") Credit_Card_Transfer_Balance = Request.Form("Credit_Card_Transfer_Balance") %>
<%
'First we create a Dictionary object to hold the results
Set objResult = CreateObject("Scripting.Dictionary")
'Then we get the complete query string for the FORM
strQuery = Request.Form
'Now we can parse the query string and fill the Dictionary
intSep = Instr(strQuery, "&")
Do While intSep
strKey = "" 'split the string into
strValue = "" 'name/value pairs.
strNVPair = Left(strQuery, intSep - 1)
strQuery = Mid(strQuery, intSep + 1)
intEqu = Instr(strNVPair, "=") 'separate the name and value.
If intEqu > 1 Then strKey = URLDecode(Left(strNVPair, intEqu-1))
If intEqu < Len(strNVPair) Then strValue = URLDecode(Mid(strNVPair, intEqu+1))
objResult.Add strKey, strValue 'and add to the dictionary.
intSep = Instr(strQuery, "&")
Loop
strKey = "" 'finally, we have to handle
strValue = "" 'the remaining name/value pair.
intEqu = Instr(strQuery, "=")
If intEqu > 1 Then strKey = URLDecode(Left(strQuery, intEqu-1))
If intEqu < Len(strQuery) Then strValue = URLDecode(Mid(strQuery, intEqu+1))
objResult.Add strKey, strValue
'Now we can loop through the Dictionary and output the results
strToLog = "Results received from FORM on " & Now() & vbCRLF
strKeysArray = objResult.Keys 'get the keys into an array
strItemsArray = objResult.Items 'get the items into an array
For intLoop = 0 To objResult.Count -1 'iterate through the array
strThisKey = strKeysArray(intLoop) 'this is the key value
strThisItem = strItemsArray(intLoop) 'this is the item (data) value
'Response.Write strThisKey & " = " & strThisItem & " " strToLog = strToLog & strThisKey & " = " & strThisItem & vbCRLF Next strToLog = strToLog & "---------------------------- " & vbCRLF 'Finally we write the results to the file, and put a message in the page If WriteToLogFile(strToLog) Then 'Response.Write "Results successfully logged." Else Response.Write "It appears that an error has occured, please contact Colonial so we can resolve the problem." Response.Write "Error in " & Err.Source Response.Write " " & Err.Description & " "
End If
%>
|