My problem is. The logining of user is save in Session variable. It leaves in 20 minutes for default. If user fill Form and sent data after automatically exite, he relocated to login.cfm. I want to safe data what he wrote. I tried to save form data in application.cfm to session.open_form. The code is: <cfif session.login is ''> Â <cfif not (GetBaseTemplatePath() contains 'enter.cfm')> Â Â <cfset session.open_path = 'http://'&cgi.http_host&cgi.SCRIPT_NAME> Â Â <cffile action="append" file="#GetDirectoryFromPath(GetBaseTemplatePath())#a.txt" output="#StructKeyList(form)#"> Â Â <cfdump var="#form#"> Â Â <cfif not structIsEmpty(form)> Â Â Â Â <cfset Session.open_form = form> Â Â </cfif> Â Â <cflocation url="enter.cfm" addtoken="no"> Â </cfif> <cfelse> Â <cfif not StructIsEmpty(session.open_form)> Â Â Â Â <cfdump var="#session.form#"> Â Â Â Â <cfset form = session.open_form> Â Â <cfset session.open_form = StructNew()> Â </cfif> </cfif> But when I do it, the FORM data not saved and cfdump sayd: "Struct is empty". If you look, i write to file list of form's key but this file is empty. If I delete the string "<cflocation url="enter.cfm" addtoken="no">, certainly the "cfdump" is show me normal data. How I save data, because i see that in php scripts it worked.
Because if user not logged it must locate to "enter.cfm" page for Login. "Application.cfm" script deside is it user logged for all page into security area. I think you want say to decide if user can view this page(for example: "test.cfm") and not locate to "enter.cfm". "test.cfm" script safe form data and locate to "enter.cfm" page if user not logged in. Is it right, what will you want to say?