I'm creating an app that will have an administration section for making
changes to the site. I'm thinking of creating a form to add and edit global
variables. What I've come up with so far is storing them in my database.
In my app_globals.cfm I put the following code:
-------------------------------------------------------------
<--- This included query gets the global variables --->
<cfinclude template="queries/qry_globals.cfm">
<--- This loops through the query and sets all of the variables in the
request scope --->
<cflock scope="application" type="readonly" timeout="30">
<cfloop query="application.GlobalVars">
<cfset "request.#application.GlobalVars.VariableName#" =
"#application.GlobalVars.VariableValue#">
</cfloop>
</cflock>
-------------------------------------------------------------
My table has three fields: VariableName, VariableValue, and UserLevel.
UserLevel is used in the admin part of the site to allow only certain people
to change certain variables.
Anyone see any problems, have any comments, or different ideas?
Thanks,
Brad
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.