I kinda fixed it.
This is part of the code:
PHP Code:
} else {
$handle = fopen('config.php','a');
$temp[00] = "" . chr(60) . chr(63) . chr(112) . chr(104) . chr(112) . ""; // < ? p h p line
$temp[01] = "error_reporting(7);";
// chr(36) is '$'
$temp[02] = "" . chr(36) . "mysql[host] = \"" . $_POST['mysqlhost'] . "\";";
$temp[03] = "" . chr(36) . "mysql[user] = \"" . $_POST['mysqluser'] . "\";";
$temp[04] = "" . chr(36) . "mysql[pass] = \"" . $_POST['mysqlpass'] . "\";";
$temp[05] = "" . chr(36) . "mysql[data] = \"" . $_POST['mysqldata'] . "\";";
$temp[06] = "" . chr(36) . "dbset = mysql_connect(" . chr(36) . "mysql[host]," . chr(36) . "mysql[user]," . chr(36) . "mysql[pass]);";
$temp[07] = "mysql_select_db(" . chr(36) . "mysql[data]);";
$temp[08] = "" . chr(36) . "admin[user] = \"" . $_POST['adminuser'] . "\";";
$temp[09] = "" . chr(36) . "admin[pass] = \"" . $_POST['adminpass'] . "\";";
$temp[10] = "" . chr(36) . "admin[email] = \"" . $_POST['adminemail'] . "\";";
$temp[11] = "?" . chr(62) . "";
$temp[12] = "" . $temp[00] . "\n" . $temp[01] . "\n\n" . $temp[02] . "\n" . $temp[03] . "\n" . $temp[04] . "\n" . $temp[05] . "\n\n" . $temp[06] . "\n" . $temp[07] . "\n\n" . $temp[08] . "\n" . $temp[09] . "\n" . $temp[10] . "\n\n" . $temp[11] . "";
fwrite($handle,$temp[12]);
fclose($handle);
The config.php file is written out like this now:
Code:
$adminpass = "sdfasdf";
error_reporting(7);
$mysql[host] = "localhost";
$mysql[user] = "username";
$mysql[pass] = "password";
$mysql[data] = "database";
$dbset = mysql_connect($mysql[host],$mysql[user],$mysql[pass]);
mysql_select_db($mysql[data]);
$admin[pass] = "sdfasdf";
$admin[pass] = "sdfasdf";
$admin[email] = "blah@whtevr.com";
?>
Dave.