Edite o arquivo de configuração PHP a partir do formulário HTML

Aqui está o meu arquivo de configuração:

<?php
#config variables
$host =         ''; #your database host
$user =         ''; #your database username
$password =     ''; #your database password
$database =     ''; #your database title
$page_title =   ''; #this appears at the top of the webpage and in the browser tab/window.
$tbl_prefix =   ''; #the prefix on your database tables. 
$installed =    false; #if false, you'll be redirected to an installation page.


if($installed == false) {
    header('Location: install/index.php');
}
else {
#connect to db
$consult_err = ' Consult <a href="lib/sqlerrors.html">lib/sqlerrors.html</a>';
$connect = @mysql_connect($host, $user, $password) 
                or die('Errno(1) - Invalid connection details.' . $consult_err); 
           @mysql_select_db($database, $connect) 
                or die('Errno(2) - Couldn\'t connect to database.' . $consult_err);  #select database
}
?>

Eu tenho um script de instalação que obtém todas as variáveis acima de um usuário, verifica se há uma conexão / banco de dados mySQL presente e cria algumas tabelas. No entanto, não encontrei uma boa maneira de editar o arquivo acima com a entrada do usuário.

Estou bastante confuso sobre onde ir a partir daqui, mas preciso que o resultado final receba a entrada de um formulário e que as variáveis no arquivo de configuração reflitam essa entrada.

Alguma sugestão?

questionAnswers(2)

yourAnswerToTheQuestion