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.
<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.