Forum Moderators: coopster
I can read from and get values properly, but I used mostly DEFINE to set values for paths, database, etc. Once I submit a form, what would be the best way to go about editing these lines?
Ex.
DEFINE( '__LIVEADMIN__','http://localhost/admin' );
DEFINE( '__PATHADMIN__','C:/wamp/www/admin' );
Once the form is submitted, I would need those values changed. Mainly, all sensitive information is using DEFINE, while small things like site title are using variables.
Thanks for any help you can provide.
I also decided to use constants instead because throughout the script I dont have to global them or pass them to functions in order to use them.
EDIT - Instead, would it be better to just rewrite all lines? Its only maybe 20 lines or so instead of trying to search and replace?
[edited by: xKillswitchx at 1:29 am (utc) on Jan. 20, 2008]
It is realy up to you how to set this functionality. The beauty of PHP is that gives you the freedom to choose from several options. You may use regular expressions, you may open the file and write those lines. The choice is yours.