title: I keep getting this error on my insert "call to undefined method mysqli_stmt::get_result()"
body: <p>I'm not sure why I keep getting this error but I need some help with it... I'm just trying to check the db to see of the record exists before allowing an insert.   </p>
  
  <pre><code>$input_errors = array();
  
  if (!empty($_POST['username'])) {
      $user = $_POST['username'];
  } else {
      $input_errors['username'] = "Must fill out username";
  }
  
  $email = filter_input(INPUT_POST, 'usermail', FILTER_VALIDATE_EMAIL);
  if (false === $email) {
      $input_errors['usermail'] = "Not a valid email address";
  }
  
  if(count($input_errors) &gt; 0) {
      print_r($input_errors); die();
  }
  
  $sql = "SELECT COUNT(*) as amount FROM people WHERE username = ? 
         OR email = ?";
  if ($stmt = $mysqli-&gt;prepare($sql)) {
  
      $stmt-&gt;bind_param("ss", $user, $email);
      $stmt-&gt;execute();
      $results = $stmt-&gt;get_result();
      $data = mysqli_fetch_assoc($results);
  
      if ($data['amount'] &gt; 0)
      {
          print "User already exists";
      }
  }
  
  else {
  $stmt = $mysqli-&gt;stmt_init();
  if (!$stmt) {
      echo "Init failed";
  } else {
      $cmd = "INSERT INTO people (username, email, sign_up_date) VALUES (?, ?, NOW() )";
      if ($stmt-&gt;prepare($cmd)) {
          $stmt-&gt;bind_param('ss', $user, $email );
          $stmt-&gt;execute();
  
          echo $stmt-&gt;affected_rows . " row(s) inserted";
  
          $stmt-&gt;close();
  
      } else {
          echo "Prepare failed";
      }
      mysqli_close($mysqli);
      }
  }
  </code></pre>
  
  <p>If anyone can lend a helping hand that would be fantastic.</p>