What I would like to do is open my site.config.php file and relplace some of the variables with ones that are gathered in a preferences form.
Example,
site.config.php reads:
<?
DEFINE ("COMPANY_NAME", "Your Company Name");
DEFINE ("COMPANY_ADDRESS", "123 Main Street");
DEFINE ("COMPANY_CITY", "Anytown");
DEFINE ("COMPANY_STATE", "NV");
DEFINE ("COMPANY_ZIP", "99999");
// database settings
DEFINE ("DB_HOST", "localhost");
DEFINE ("DB_NAME", "clientloginutility");
DEFINE ("DB_USER", "root");
DEFINE ("DB_PASS", "");
DEFINE ("DB_PREFIX", "clu_");
// set up database connection
mysql_connect (DB_HOST, DB_USER, DB_PASS) or die ("could not connect");
mysql_select_db (DB_NAME) or die ( 'Unable to select database! - Please check your database settings in /php/site.config.php');
?>
then in the admin area of the script, there would be a form asking
what is company name ____________ (<- would be an input box)
..
..
..
What is zip code _______________
Then when the submit button is chosen, it would replace the inputted data from admin area into the site.config.php file. Does that make sense, I hope it does...
But the question is....How to accomplish this feat?? I have seen it before but am not that experienced of php coder to pick it out of a script thats already written. Any help would be appreciated,
Thanks in Advance
Squid