coldkash
02-09-2001, 06:03 AM
I have three pages taking employee information as input (Personal data, Education, Working Exp, Projects, Skills etc) I am using javascript for client side validation and Cold Fusion on the server side. I want to persist data from first to last form so that at end of submission user can verify the data then it will be posted in the data base. For example I have listed 60 skills under 10 heads - user will select as many as he can then add experience and certification info for these skills on next page how should i persist this info with other information. < Should i use application.cfm and how?>
Please guide!
Circa3000
02-11-2001, 04:17 PM
Use ColdFusion's session management.
Place an 'application.cfm' file in your application's root directory. This file will load and execute automatically for each CF page called from that directory or any subdirectory.
The application.cfm file should include the following line:
<cfapplication name="MyApp" sessionmanagement="yes">
...and any other code you'd like executed at the start of your application pages. Typical uses are to check for variables, setup default values, send back-door visitors to a login page, etc.
Next, in your ColdFusion pages, precede each persistent variable with "session." For example:
<cfset session.JobSkill1 = 'yes'>
<cfset session.JobSkill2 = 'no'>
<cfset session.JobSkill3 = 'no'>
Those variables should persist from page to page (or until the server's session timeout period is reached -- typically 5 minutes). For example, on your final page, you could include:
<cfoutput>
Job Skill #1: <cfif session.JobSkill1 eq 'yes'>YES<cfelse>NO</cfif><br>
</cfoutput>
I hope this is helpful.
Dave Delbridge
President & CEO
Circa 3000
Advanced ColdFusion Hosting Solutions