WDDX would make this easy, no need to modify any DB fields or anything if
you change your forms.
(Also no need for a complex DB)

Example:


<!--- set your forms --->
<cfset session.forms = structnew()>

<cfloop from="1" to="10" index="i">
        <cfset session.forms[i] = structnew()>
        <cfloop from="1" to="10" index="n">
                <cfset session.forms[i][n] = createuuid()>
        </cfloop>
</cfloop>

<cfdump var="#session#">

<!--- wddx them --->
<cfwddx action="cfml2wddx" input="#session.forms#" output="mysavedforms">
<!--- store the wddx whereever you want (file, db) --->

<!--- mimic session ending, losing all data --->
<cfset session.forms = structnew()>
<cfdump var="#session#">


<!--- user logs in, get the data, recreate the structs --->
<!--- dewddx back to session --->
<cfwddx action="wddx2cfml" input="#mysavedforms#" output="session.forms">

<cfdump var="#session#">



Job done.

-----Original Message-----
From: Jeremy Bunton [mailto:[EMAIL PROTECTED]
Sent: 30 March 2006 17:40
To: CF-Talk
Subject: Save sessions to repopulate at a later date


I have an application that has many forms that are saved in sessions as the
user jumps from page to page, allowing them to see what they had entered on
any page at any given time. Now the users want to be able to hit a button,
save the entry and come back weeks later and see what they had entered. Now
I need a way to save all sessions to a file, perhaps text or something. So
that the user can login say 3 weeks later select the saved criteria (which
there may be 50 different ones of by now) and then have all the forms
repopulated with the same data as before. Any ideas how I might get that
done.

Jeremy






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236567
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