title: Warning: mysqli_set_charset() expects exactly 2 parameters, 1 given
body: <p>I used to use Mysql making my php script and now I wanted to switch this script to Mysqli and Im in trouble with changing All Mysql codes into Mysqli.</p>
  
  <p>How to solve this problem?
  The function of setting names to UTF8 not working. It says :</p>
  
  <blockquote>
    <p>Warning: mysqli_set_charset() expects exactly 2 parameters, 1 given</p>
  </blockquote>
  
  <p>What's the second Parameter I'm missing here?</p>
  
  <p>Here is the class I'm using</p>
  
  <pre><code>class Database {
      private $dbhost, $dbuser, $dbpass, $dbname;
  
      public function __construct($host,$user, $pass,$name){
          $this-&gt;dbhost = $host;
          $this-&gt;dbuser = $user;
          $this-&gt;dbpass = $pass;
          $this-&gt;name   = $dbname;
      }   
  
      public function Connect (){
          mysqli_connect ($this-&gt;dbhost,$this-&gt;dbuser,$this-&gt;dbpass,$this-&gt;dbname)
              OR die (mysqli_error());
      }
  
  
      public function SetNamesUTF8($unicode){
          mysqli_set_charset($unicode);
      }
  }
  
  $Database = new Database('localhost','root','root','schoolmanager');
  $Database -&gt; Connect(); 
  $Database -&gt; SetNamesUTF8('UTF8');
  </code></pre>