Connection database using PHP 7 Error
<p>Hello I'm auditioning for a server with php 7 have the script running in the previous version, do not know correct, it seems that is not finding and querying the database, could anyone help me?</p>

<blockquote>
  <p>Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /home/insert/public_html/classesBD.php:7 Stack trace: #0 /home/insert/public_html/classesBD.php(30): conecta->conecta() #1 /home/insert/public_html/index.php(9): consultar->executa('SELECT * FROM p...') #2 {main} thrown in /home/insert/public_html/classesBD.php on line 7</p>
</blockquote>

<p>LINE 7 -->  </p>

<pre><code>$this-&gt;bancoDados = mysqli_connect(SERVIDOR_BD, USUARIO_BD, SENHA_BD) or trigger_error(mysqli_error(),E_USER_ERROR);//3. Store in class variable
</code></pre>

<p>the script</p>

<pre><code>define("SERVIDOR_BD", "localhost");
define("BANCO_DE_DADOS", "XXXXXX");
define("USUARIO_BD", "XXXXXXXX");
define("SENHA_BD", "XXXXXXX");

class conecta {
    public $database_bancoDados = null;//1. New Added Field
    public $bancoDados = null;//2. New Added Field
    function conecta($servidor="", $bancoDeDados="", $usuario="", $senha=""){
        if (($servidor == "") &amp;&amp; ($usuario == "") &amp;&amp; ($senha == "") &amp;&amp; ($bancoDeDados == "")){
            $this-&gt;bancoDados = mysqli_connect(SERVIDOR_BD, USUARIO_BD, SENHA_BD) or trigger_error(mysqli_error(),E_USER_ERROR);//3. Store in class variable
            $this-&gt;database_bancoDados = BANCO_DE_DADOS;//4. Store in class variable
        } else {
            $this-&gt;bancoDados = mysqli_connect($servidor, $usuario, $senha) or trigger_error(mysqli_error(),E_USER_ERROR);//5. Store in class variable
            $this-&gt;database_bancoDados = $bancoDeDados;//6. Store in class variable
        }
    }    
}

class consultar {

    var $bd;
    var $res;
    var $row;
    var $nrw;
    var $data;

    function executa($sql=""){
        if($sql==""){
            $this-&gt;res =  0; // Pointer result of the executed query
            $this-&gt;nrw =  0; // Line number the query returned, cruise control
            $this-&gt;row = -1; // Array of the current query line
        }
        // Connects to the database   
           $this-&gt;bd = new conecta();//7. Store in class variable
           $this-&gt;bd-&gt;conecta();//8. Store in class variable
           mysqli_select_db($this-&gt;bd-&gt;bancoDados, BANCO_DE_DADOS);//9. Change Here For parameter sequence
           $this-&gt;res = mysqli_query($this-&gt;bd-&gt;bancoDados, $sql); //10. Change here for parameter sequence
           $this-&gt;nrw = @mysqli_num_rows($this-&gt;res);

        $this-&gt;row = 0;
        if($this-&gt;nrw &gt; 0)
            $this-&gt;dados();
    }

    function primeiro(){
        $this-&gt;row = 0;
        $this-&gt;dados();
    }

    function proximo(){
        $this-&gt;row = ($this-&gt;row&lt;($this-&gt;nrw - 1)) ?
                        ++$this-&gt;row:($this-&gt;nrw - 1);
        $this-&gt;dados();
    }

    function anterior(){
        $this-&gt;row = ($this-&gt;row &gt; 0) ? -- $this-&gt;row:0;
        $this-&gt;dados();
    }        

    function ultimo(){
        $this-&gt;row = $this-&gt;nrw-1;
        $this-&gt;dados();
    }

    function navega($linha){
        if($linha&gt;=0 AND $linha&lt;$this-&gt;nrw){
            $this-&gt;row = $linha;
            $this-&gt;dados();
        }
    }

    function dados(){
        mysqli_data_seek($this-&gt;res, $this-&gt;row);
        $this-&gt;data = mysqli_fetch_array($this-&gt;res);
    }
}
//Mostra todos os erros!    
error_reporting(E_ALL);
ini_set('display_errors', 1);
</code></pre>