";
echo "DBName:
";
echo "DBUser:
";
echo "DBPassword:
";
echo "
";
echo "";
}
if ($step == '2') {
echo "If conection faild click here
";
require_once "$configfilePath";
mysqli_close($link);
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(!$link->query($templine)){
$error .= 'Error performing query "' . $templine . '": ' . $link->error . '
';
}
$templine = '';
}
}
header("Location: setup.php?step=4");
}
if ($step == '4') {
echo"
Please fill this form to create an account.
"; echo""; } if ($step == '5') { echo "Setup done !"; echo"