title: stmt->execute() (Array to string conversion error)
body: <p>Team, I am trying to insert a register in a mysql db, and while using mysqli I am getting an error on <code>execute()</code></p>
  
  <blockquote>
    <p>Notice: Array to string conversion in C:\xampp\htdocs\InsereSite.php
    on line 19 Call Stack execute ( ) ..\InsereSite.php:19</p>
  </blockquote>
  
  <p>I am not sure why it tries to make this conversion but, at any case, here is the code. Please tell me more datails as you can.</p>
  
  <pre><code>&lt;?php
  function InsertSiteDb($site_novo){
  
      if(!isset($_POST['sites'])) {
          echo " Voce precisa estar logado para acessar essa pagina";
          header('Location:sellsite_login.html');
  
      }else{
  
          $mysqli = new mysqli('localhost', 'root', '', 'sellsites');
  
  
          $query = "INSERT INTO pages (url,file,public,price) VALUES (?,?,0,0)";
          $stmt = $mysqli-&gt;prepare($query);
  
          $stmt-&gt;bind_param('ss',$_SESSION['url'],$_SESSION['nomesite']);
          //$stmt-&gt;execute();
  
          $stmt-&gt;close();
  
  
      }
  
  
  }
  ?&gt;
  </code></pre>
  
  <p>Here is where the InsertSiteDb is called:</p>
  
  <pre><code>&lt;?php
  
      session_start();
      $sites = $_POST['sites']; //o que foi digitado no form será postado
      var_dump($sites);
      $sites = explode(";",$sites);
  
  
  foreach ($sites as $site) {
          $recebesite_html[] = file_get_contents($site); 
  }                                                   
  
  $contador = 0;
  
   foreach ($recebesite_html as $site_novo){
      $pos = strpos($site_novo, "&lt;title&gt;"); 
      $pos_final = strpos($site_novo,"&lt;/title&gt;");
      echo $pos.$pos_final;
  
      $pos += 7; 
      $tamanho = $pos_final -$pos;
  
      $nome=substr($site_novo,$pos,$tamanho);
      $_SESSION['nomesite'] = $nome;
      $_SESSION['url'] = $sites;
      $retorno = file_put_contents($nome.".html",$site_novo);
      echo $retorno;
      var_dump($site);
   }
  
  include ("InsereSite.php");
  $registro_site=InsertSiteDb($_SESSION['nomesite']);
  
  
  ?&gt;
  </code></pre>