Hello everyone,
i am reading a cookie created by an ASP page. Let's called the cookie "aspcookie".
The way the ASP cookie was made was using "crumbs" in the following way:
==============================================
Response.Cookies("AffilPassedInfo")("cookieID") = data1
Response.Cookies("AffilPassedInfo")("ID") = data2
Response.Cookies("AffilPassedInfo")("tblID") = data3
==============================================
so, at the end, when i read the cookie in CF, it looks like this (w/o the quotes of
course)
==============================================
"cookieID=1ID=1&tblID=QQ_323s"
==============================================
I have gotten as far as breaking this into individual value pairs by looping through
the list (& is its delimiter). My problem is that i cannot actually create a variable
for each item and assign it its given value based on the list. Here is what i have
tried:
==============================================
<cfif isdefined("cookie.AffilPassedInfo")>
<!--- AffilPassedInfo is in this customer's system --->
<cfoutput>#cookie.AffilPassedInfo#</cfoutput>
<hr>
<cfloop list="#cookie.AffilPassedInfo#" delimiters="&"
index="cookievaluepairpointer">
<cfoutput>
<!--- #cookievaluepairpointer# = #cookievaluepairpointer# -
--->
<cfset #cookievaluepairpointer#>#cookievaluepairpointer#<br>
</cfoutput>
</cfloop>
<cfoutput>
cookieID = #cookieID#<br>
ID = #ID#<br>
AffMemID = #AffMemID#<br>
tblID = #tblID#<br>
</cfoutput>
<cfelse>
not accessible
</cfif>
==============================================
The actual result i get is this:
==============================================
cookieID=149755&ID=NLHp110102&AffMemID=&tblID=386382
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm