title: mysqli::__construct() expects parameter 5 to be integer
body: <p>I am trying to upload my website to a web hosting but i need phpmyadmin so i went to phpmyadmin.co with the username, password and server then when i tried to add that to my php file it came up with this error </p>
  
  <blockquote>
    <p>mysqli::__construct() expects parameter 5 to be integer</p>
  </blockquote>
  
  <p>this is the code of my website</p>
  
  <pre><code>&lt;?php
  
  class User{
  private $dbServer   = "";
  private $dbHost     = "http://www.phpmyadmin.co/";
  private $dbUsername = "";
  private $dbPassword = "";
  private $dbName     = "sql12168044";
  private $userTbl    = "users";
  
  public function __construct(){
      if(!isset($this-&gt;db)){
          // Connect to the database
          $conn = new mysqli($this-&gt;dbHost, $this-&gt;dbServer, $this-&gt;dbUsername, $this-&gt;dbPassword, $this-&gt;dbName);
          if($conn-&gt;connect_error){
              die("Failed to connect with MySQL: " . $conn-&gt;connect_error);
          }else{
              $this-&gt;db = $conn;
          }
      }
  }
  
  /*
   * Returns rows from the database based on the conditions
   * @param string name of the table
   * @param array select, where, order_by, limit and return_type conditions
   */
  public function getRows($conditions = array()){
      $sql = 'SELECT ';
      $sql .= array_key_exists("select",$conditions)?$conditions['select']:'*';
      $sql .= ' FROM '.$this-&gt;userTbl;
      if(array_key_exists("where",$conditions)){
          $sql .= ' WHERE ';
          $i = 0;
          foreach($conditions['where'] as $key =&gt; $value){
              $pre = ($i &gt; 0)?' AND ':'';
              $sql .= $pre.$key." = '".$value."'";
              $i++;
          }
      }
  
      if(array_key_exists("order_by",$conditions)){
          $sql .= ' ORDER BY '.$conditions['order_by']; 
      }
  
      if(array_key_exists("start",$conditions) &amp;&amp; array_key_exists("limit",$conditions)){
          $sql .= ' LIMIT '.$conditions['start'].','.$conditions['limit']; 
      }elseif(!array_key_exists("start",$conditions) &amp;&amp; array_key_exists("limit",$conditions)){
          $sql .= ' LIMIT '.$conditions['limit']; 
      }
  
      $result = $this-&gt;db-&gt;query($sql);
  
      if(array_key_exists("return_type",$conditions) &amp;&amp; $conditions['return_type'] != 'all'){
          switch($conditions['return_type']){
              case 'count':
                  $data = $result-&gt;num_rows;
                  break;
              case 'single':
                  $data = $result-&gt;fetch_assoc();
                  break;
              default:
                  $data = '';
          }
      }else{
          if($result-&gt;num_rows &gt; 0){
              while($row = $result-&gt;fetch_assoc()){
                  $data[] = $row;
              }
          }
      }
      return !empty($data)?$data:false;
  }
  
  /*
   * Insert data into the database
   * @param string name of the table
   * @param array the data for inserting into the table
   */
  public function insert($data){
      if(!empty($data) &amp;&amp; is_array($data)){
          $columns = '';
          $values  = '';
          $i = 0;
          if(!array_key_exists('created',$data)){
              $data['created'] = date("Y-m-d H:i:s");
          }
          if(!array_key_exists('modified',$data)){
              $data['modified'] = date("Y-m-d H:i:s");
          }
          foreach($data as $key=&gt;$val){
              $pre = ($i &gt; 0)?', ':'';
              $columns .= $pre.$key;
              $values  .= $pre."'".$val."'";
              $i++;
          }
          $query = "INSERT INTO ".$this-&gt;userTbl." (".$columns.") VALUES (".$values.")";
          $insert = $this-&gt;db-&gt;query($query);
          return $insert?$this-&gt;db-&gt;insert_id:false;
      }else{
          return false;
      }
  }
  }
  </code></pre>