function mysql_connect($host, $user, $pass) { installer::$mysqli = new mysqli($host, $user, $pass); // http://php.net/manual/en/mysqli.connect.php says to use mysqli_connect_error() instead of // $mysqli->connect_error because of bugs before PHP 5.2.9 $error = mysqli_connect_error(); return empty($error); }