Setting the DB config from user input


I need to set the DB config values(host name,db name, username,password) in the main config file from the user input form. Can any one suggest how to achive this.

You can collect this input in a form, then create a new dbConnection:

$db=new CDbConnection;



//not tested