>> Try this 
>>
>> <cfset session["qNum#form.qNum#"] = form.answer>

PERFECT. I never would have figured that out on my own. I mean, there's
not even a DOT after "session".  Thanks.

Sincerely,
 
Andrew


-----Original Message-----
From: Ewok [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 19, 2004 12:40 PM
To: CF-Talk
Subject: RE: Using a form field name as part of the name of a session
variable

Try this 

<cfset session["qNum#form.qNum#"] = form.answer>

Or something like that... maybe without quotes? But I think with.


-----Original Message-----
From: Peterson, Andrew S. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 1:23 PM
To: CF-Talk
Subject: Using a form field name as part of the name of a session
variable

Hi,
 
I'm hoping this is just a question of syntax. Is it possible to set part
of the name of a session variable using the name of a form variable? The
form name is dynamic too. Here's the code that ain't working:
 
<cfset session.qNum#form.qNum# = form.answer>
                    ^^^^^^^^^
For example, what I'd like to set in the above line of code is a session
variable named "qNum2", or whatever value "form.qNum" is.
 
If this doesn't work, I can always hard code it using a 1000 line
cfswitch block, but no one (me most of all) wants to see that :-)
 
Thanks in advance.
 
Sincerely,
 
Andrew





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=36

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181900
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to