<?php
error_reporting(0);
$_GET['step'] = true;
require('../../../classes/config.php');
include "../../../inc/db.php";
$filename = 'install.sql';
$mysql_host = db_host;
$mysql_username = db_user;
$mysql_password = db_pass;
$mysql_database = db_name;
mysql_connect($mysql_host, $mysql_username, $mysql_password) or die('Error connecting to MySQL server: ' . mysql_error());
mysql_select_db($mysql_database) or die('Error selecting MySQL database: ' . mysql_error());
$templine = '';
$lines = file($filename);
foreach ($lines as $line)
{
if (substr($line, 0, 2) == '--' || $line == '')
continue;
$templine .= $line;
if (substr(trim($line), -1, 1) == ';')
{
// Perform the query
mysql_query($templine) or print('Error performing query '<strong>' . $templine . '': ' . mysql_error() . '<br /><br />');
// Reset temp variable to empty
$templine = '';
}
}
$e->location('../../../install.php?step=4');
?>