You should never do this:
<cfset cookieVal = #COOKIE.cname#>

When in doubt rely on <cfdump val="#cookie#">



> To: [email protected]
> Subject: [cfaussie] Re: variable name confusion
> Date: Fri, 23 May 2008 14:52:22 +1000
> From: [EMAIL PROTECTED]
> 
> 
> <cfset cookieVal = #COOKIE.cname#>
> 
> Should be
> 
> <cfset cookieVal = "#COOKIE.cname#">
> 
> 
> 
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613  9015 8628
> Mobile: 0404 998 273
> 
> 
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
> Of nedlud
> Sent: Friday, 23 May 2008 1:40 PM
> To: cfaussie
> Subject: [cfaussie] variable name confusion
> 
> 
> I have an app that gets included on three seperate pages withing the
> same domain (pages A, B, C all use app X). On each page where it gets
> used, I use a cookie to store user preferences. The preferences need
> to be unique to where the app gets used, so I dynamicly create the
> cookie name depending on which page it gets loaded from (page As
> cookie is called cookie A, page Bs cookie is called cookie B, etc)
> 
> The following code seems to work for naming and setting the cookies...
> 
> <cfset cname="appname_" & "pagename">
> <cfcookie expires="never" name="#cname#" value="#fvalue#">
> 
> My trouble starts when I'm trying to read the value of the cookie on
> the next visit.
> 
> <cfset cookieVal = #COOKIE.cname#>
> 
> This isn't working since it's loking for a cookie with the liiteral
> name of "cname" instead of the value of "cname".
> 
> How do I resolve this?
> 
> 
> 
> > 

_________________________________________________________________
Search for local singles online @ Lavalife - Click here
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D30290&_t=764581033&_r=email_taglines_Search_OCT07&_m=EXT
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to