title: Call to undefined method DB_Class::prepare()
body: <p>I know this probably has been asked before, but the answers in other topics I found didn't seem to help for me :/. I'm not sure what I'm doing wrong when I follow the answers but its bugging me out.</p>
  
  <p>The error: Call to undefined method DB_Class::prepare()  on line 15. I've put a comment line to mark it.</p>
  
  <p>The code is in Dutch, I hope that ain't a problem.</p>
  
  <p>Reg_Functies.php (or the relevant part atleast):</p>
  
  <pre><code>&lt;?php
  require_once("Reg_Config.php");
  class Gebruiker
  {
      private $db;
  
      public function Gebruiker()
      {
          $this-&gt;db = new DB_Class();
      }
  
      public function check_login($email, $wachtwoord) 
      {
          $wachtwoord = md5($wachtwoord);
          $resultaat = $this-&gt;db-&gt;prepare("SELECT Log_ID, Log_Bevoegdheid from login WHERE Log_Email = ? and Log_Wachtwoord = ?"); //this line gives the error
  
          $resultaat-&gt;bind_param("ss", $email, $wachtwoord);
          $resultaat-&gt;execute();
  </code></pre>
  
  <p>Reg_Config.php:</p>
  
  <pre><code>&lt;?php
  define('DB_Server', 'localhost');
  define('DB_Gebruikersnaam', 'root');
  define('DB_Wachtwoord', 'password');
  define('DB_Database', 'database');
  class DB_Class 
  {
      function __construct() 
      {
          $connection = mysqli_connect(DB_Server, DB_Gebruikersnaam, DB_Wachtwoord, DB_Database);
          if (mysqli_connect_errno())
          {
              echo "Failed to connect to MySQL: " . mysqli_connect_error();
          }
      }
  }
  </code></pre>
  
  <p>?></p>
  
  <p>It's probably something very simple I'm looking over, but help is really appreciated.</p>