CODE
if ($_POST['Submit']) {
extract($_POST);
$file_to_write = 'config.php';
That is saying, if the Submit button has been hit, excecute the following stuff...
CODE
extract($_POST);
Means to extract the $_POST part of all variables, just making it $name, $username and so on. It makes it easier to handle.
CODE
$file_to_write = 'config.php';
That is the file in which you are saving to. You will have to chmod this file to 777 to allow the script to have the access to write to this file.
CODE
$content .="<?phpn";
$content .="$config['name'] = '$name';n";
$content .="$config['password'] = '$password';n";
$content .="$config['email'] = '$email';n";
$content .="$config['db_user'] = '$db_user';n";
$content .="$config['db_pass'] = '$db_pass';n";
$content .="$config['db_data'] = '$db_data';n";
$content .="$config['db_host'] = '$db_host';n";
$content .="?>";
That is what is going to be written. Using that, what ever that has will be written to the file. Using n means to make a break in english, to go to the next line. You use the same vairable for everything because its the same file, just adding on more to it to make it easier to see line by line. You use the
.= to show that it is linked to each other. To make sure that nothing goes wrong.