Forum Moderators: coopster
This is how the Control Panel will be:
---------------------------------------------------------------------
controlpanel.php
MySQL Settings:
DB Server: (single line textbox here)
DB Name: (single line textbox here)
DB Username: (single line textbox here)
DB Password: (single line textbox here)
(save config button here)
---------------------------------------------------------------------
config.php
/* --------MySQL Settings-------- */ define("DB_SERVER", "localhost"); define("DB_USER", "username"); define("DB_PASS", "password"); define("DB_NAME", "whatever"); Ok... so I guess what I need to know is can I read ONLY one part of a file like... localhost? And then display it in the control panel input box by DB Server. Then, make only that portion of the config file allowed to be edited. or what? how should I do this?
I'm not sure what you want to use it for but keep in mind that the settings you show in your example could lead to trouble if you don't do some authentication as to who can change what and when. You alos need to look out for sql injections that would cause harm.
JAG
first of all, thanks for a quick response...
NOTE: The control panel has a login, and stripslashes are in effect in the script.
I see where you are going and I understand the logic in doing it that way but I just don't know how to code it. Would you be kind enough to code an example of some sort?
Thanks,
Johnny