<?php
require_once('../includes/config.php');
$install_version = '1.0';
// Content that will be written to the config file
$content = "<?php\n";
$content.= "\$config['db']['host'] = '".addslashes(stripslashes($config['db']['host']))."';\n";
$content.= "\$config['db']['name'] = '".addslashes(stripslashes($config['db']['name']))."';\n";
$content.= "\$config['db']['user'] = '".addslashes(stripslashes($config['db']['user']))."';\n";
$content.= "\$config['db']['pass'] = '".addslashes(stripslashes($config['db']['pass']))."';\n";
$content.= "\$config['db']['pre'] = '".addslashes(stripslashes($config['db']['pre']))."';\n";
$content.= "\n";
$content.= "\$config['version'] = '".$install_version."';\n";
$content.= "\$config['installed'] = '1';\n";
$content.= "?>";
// Open the includes/config.php for writting
$handle = fopen('../includes/config.php', 'w');
// Write the config file
fwrite($handle, $content);
// Close the file
fclose($handle);
echo "<br><Br><Br>Thank You! for upgrading PHP Manual Creator, Please <a href=\"../adm/\">click here</a> to access your admin";
?>