On 7/15/00, Kim Ahlbrandt penned:
>Ok, I'm new to the list...and new to using coldfusion. I need to ensure
>that users can only go through the system in a certain order (they must fill
>out forms in a particular order and should not be allowed to come into any
>page of the system without first going through the previous pages). Does
>anyone know how this is best achieved. Any advice will be helpful.
One way is to have everything pointing to a central file, like it's
done with fusebox, then use cfswitch or cfif statements and load an
include with the content you want based on the action. You could also
read the cgi.http_referer and send them to the right page if they
didn't come from the page you want. In the example below, anyone
going to the page without an action specified will get the page where
you want them to begin. Then for each form, put a hidden input tag
named "action". You can also put multiple submit buttons with the
name "action" and depending upon the value of the button they click
they will then see the page you want them to see.
<cfswitch expression="#action#">
<cfdefaultcase>
<cfinclude template="mainpage.cfm">
</cfdefaultcase>
<cfcase value = "showpage1">
<cfinclude template="page1.cfm">
</cfcase>
<cfcase value = "showpage2">
<cfinclude template="page2.cfm">
</cfcase>
<cfcase value = "showpage3">
<cfinclude template="page3.cfm">
</cfcase>
<cfcase value = "showpage4">
<cfinclude template="page4.cfm">
</cfcase>
</cfswitch>
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.