I can think of a couple:

<cfset session = duplicate(form)> 

If you're running 4.5, sp2

<cfset session = structappend(session, form)> (it's one of those hidden
functions)

|-----Original Message-----
|From: Jay Wigginton [mailto:[EMAIL PROTECTED]]
|Sent: Friday, March 16, 2001 4:35 PM
|To: CF-Talk
|Subject: form to session
|
|
|Is there a simple way to take the values submitted from a form 
|and setting
|session variables with the same name... example:
|
|form submits variables.... Form.FirstName and Form.LastName... 
|I need to
|set... Session.FirstName = Form.FirstName and Session.LastName =
|Form.LastName...
|
|I know I can use... <cfset Session.FirstName = Form.FirstName>
|
|But, I want to do this <cfloop> looping over the fieldnames... 
|something
|like...
|
|<cfloop index="field" list="#fieldnames#">
|       <cfoutput>
|               <cfset session.#field# = Form.#field#>
|       </cfoutput>
|</cfloop>
|
|The above produces an error... :(
|
|
|thanks in advance
|Jay
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to