"; echo "DBName:

"; echo "DBUser:

"; echo "DBPassword:

"; echo "
"; echo ""; } if ($step == '2') { echo "If conection faild click here
"; require_once "$configfilePath"; mysqli_close($mysqli); header("Location: setup.php?step=3"); } if ($step == '3') { echo "Populating DB"; require_once "$configfilePath"; $templine = ''; $lines = file($sqlfileName); $error = ''; foreach ($lines as $line){ if(substr($line, 0, 2) == '--' || $line == ''){ continue; } $templine .= $line; if (substr(trim($line), -1, 1) == ';'){ if(!$mysqli->query($templine)){ $error .= 'Error performing query "' . $templine . '": ' . $mysqli->error . '

'; } $templine = ''; } } header("Location: setup.php?step=4"); } if ($step == '4') { unlink("$sqlfileName"); unlink("$sampleconfigfilePath"); unlink('setup.php'); echo "Setup done,removed unnecessary setup files
Go to index"; } ?>