| 
 Posted by MS on 05/16/05 18:18 
I have built a website in PHP but on each page request it includes a config 
file which defines all my global variables. 
 
define('WEB_NAME', 'The Website Name'); 
 
Although this works well, i am looking for a way for this config file to be 
edited so that the values can be changed by the admin user (who may not 
possess programming knowledge), but i dont want the variable name to be 
changed. 
 
I have been considering packing all the global variables into a database so 
that the values can be changed via an online form. then in the config file 
instead of reading the define statements it reads the database to get the 
desired values. 
 
this of course has a downside to more server work accessing the database on 
each page call. 
 
can anyone direct me in a more favourable way to define these variables and 
have them easily changed by novice users. 
 
most of my define statements are defining layout attributes and i would like 
to save all values under one heading... 
 
eg. 
Layout1 
define... 
define... 
define... 
 
Layout2 
define... 
define... 
define... 
 
etc.. 
 
which is another reason i thought a database would be the way to go. 
 
All comments and ideas are welcome. 
 
Thnx 
Alex 
 
--  
---------------------------------------------------------------------------- 
http://www.clickonlingerie.com?SIG - Exotic Erotic Lingerie 
----------------------------------------------------------------------------
 
  
Navigation:
[Reply to this message] 
 |