Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application.cfm update

Status
Not open for further replies.

TerryPercival

Programmer
Jun 29, 2001
4
US
I need to create a page that reads application.cfm and displays certain settings that could be updated by a user type. I thought maybe somebody would have something already created that I could use or is this something that is totally strange? Thanks.
 
The easiest way to update settings in an application.cfm file is to use queries in that file and update the queried values as necessary using CF templates.

So, your application file may look like:

<!-- start of file -->
<cfapplication sessionmanagement=&quot;yes&quot; clientmanagement=&quot;yes&quot;>

<cfquery datasource=&quot;datasource&quot; name=&quot;getParams&quot;>
SELECT Password
FROM Params
</cfquery>

<cfset session.pass = #getParams.Password#>
<!-- end of file -->

You can then simply update the Params table whenever you want by conventional means. John Hoarty
jhoarty@quickestore.com
 
I think that what you have in mind is acctualy very common practice;
the way I had this solved is that I am storing all settings for the site in the database; when new user is accessing the site, all site constants are set using values that are stored in the admin table;
working with session and application variables, I am using those values throughout the site;
if user wants to change some of the values, I will store user settings in the database with all other info about that user, so next time he (or she) access the site, using cfid or some other method the user is recognized, and if his settings are defined, the application.cfm will set the site constants using the usere settings

this might not be the best way, but that is how I am doing it; If there is some better way, I would like to know it too... Sylvano

dsylvano@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top