I have to pass a value using a session, I want to create a session based on the UID of the item in question, and there will be several of them, so I might have UID:23, UID:40, UID: 200 for example. Then on the following page I can relate that value back using UID.
The question is, what is the correct format for this? Could anybody post an example of
a) How I set the session name, let's say that the UID is stored in a query variable #GETCAMP.CAMP_UID#
b) How would I then read it back (The value of getcamp.camp_uid) is also passed through
I know this is not right but I think I might be close with -->
SET:
<CFSET session.[getcamp.camp_uid] = "#getcamp.camp_uid#">
READ:
<CFOUTPUT>#session.[url.camp_uid]</CFOUTPUT>
Thanks
Mark
I am not concerned about the multiple windows as it's going to be used inside a mobile phone app that draws content from the server, and the app would just not allow more than one session to ever exist, so I'm safe in that department.
Could you possibly give me a small example of what you were describing?
Thanks
Could you possibly give me a small example of what you were describing?
There's a whole section in the docs about how to use variables in CF. You should really make sure you know this stuff thoroughly if you're using CF (as it's about as fundamental as it gets when using a programming language):
Specifically:
struct[dynamicKeyName] = value
Where "struct" is the struct one is using (and a scope - for all intents and purposes - is a struct), "dynamicKeyName" is a string or a variable containing a string which is the name fo the key, and "value" is... err... the value.
But don't take my word for it: read the docs and get up to speed with all this stuff.
--
Adam
North America
Europe, Middle East and Africa
Asia Pacific