Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetHTTPRequestData - Correct CFLoop Format

Status
Not open for further replies.

MinalMoe

IS-IT--Management
Mar 25, 2004
62
GB
Using MX7 - not quite sure - is this code correct.

<cfset x = GetHTTPRequestData()>
<cfloop index="item.content" list="#x#" delimiters="&">
<cfif ListLen(item, "=") gt 1>
<cfset param_level = URLDecode(ListGetAt(item, 1, "="))>
<cfset value = URLDecode(ListGetAt(item, 2, "="))>
<cfif param_level EQ "transStatus"><cfset transStatus = #value#></cfif>
<cfif param_level EQ "transId"><cfset transId = #value#></cfif>
<cfif param_level EQ "AVS"><cfset AVS = #value#></cfif>
<cfif param_level EQ "cost"><cfset cost = #value#></cfif>
<cfif param_level EQ "cartId"><cfset cartId = #value#></cfif>
<cfelse>
<cfset param_level = "">
<cfset value = "">
</cfif>
</cfloop>

Is the <cfloop index="item.content" correct?

Should I use [key] structures, or is the above OK?

Thanks for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top