title: Fatal error: Uncaught Error: Call to undefined function mysqli_stmt_get_result()
body: <p>I'm dealing with a fatal error, and I see a lot of solutions for it everywhere but I can't seem to find the right solution that fits in my code...</p>
  
  <p>so this is the code where it goes wrong:</p>
  
  <pre><code>$link = mysqli_connect($server, $gebruiker, $wachtwoord, $database);
  
  if($link === false) {
      die("ERROR: Kon geen verbinding maken. " . mysqli_connect_error());
  }
  if(isset($_REQUEST['term'])) {
      $sql = "SELECT * FROM producten WHERE naam LIKE ?";
  
      if($stmt = mysqli_prepare($link, $sql)) {
  
          mysqli_stmt_bind_param($stmt, "s", $param_term);
  
          $param_term = '%' . $_REQUEST['term'] . '%';
  
          if(mysqli_stmt_execute($stmt)) {
              $result = mysqli_stmt_get_result($stmt);
              if(mysqli_num_rows($result) &gt; 0) {
                  while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
                      echo "&lt;p&gt;&lt;a href=toevoegen.php?id=" . $row['id'] . " style=\"text-decoration: none\"&gt;" . $row["naam"] . "&lt;/a&gt;&lt;/p&gt;";
                  }
              } else {
                  echo "&lt;p&gt;Geen producten gevonden&lt;/p&gt;";
              }
  
          } else {
              echo "ERROR: Kon $sql niet uitvoeren. " . mysqli_error($link);
          }
      }
      mysqli_stmt_close($stmt);
  }
  
  mysqli_close($link);
  </code></pre>
  
  <p>this is the part that messes it all up:</p>
  
  <pre><code>$result = mysqli_stmt_get_result($stmt);
  </code></pre>
  
  <p>Who can help me in the right direction, thanks!</p>