title: Looping through results in mysqli
body: <p>I am new to mysqli and having a problem looping through results with mysqli.  Unfortunately, I am only getting a single result.  When I put the query into phpMyAdmin, it comes up with three results.  I believe the relevant code is here and that I am just calling it wrong:</p>
  
  <pre><code>$connection = new mysqli($host, $databaseUsername, $databasePassword, $database);
  
  if ($connection-&gt;connect_errno &gt; 0) {
      die ('Unable to connect to database [' . $connection-&gt;connect_error . ']');
  }
  
  $sql = "SELECT clientId, studentFirstName, studentLastName
          FROM clients
          WHERE (studentEmail = '$postEmail') OR (parentEmail = '$postEmail');";  
  
  if (!$result = $connection-&gt;query($sql)) {
      die ('There was an error running query[' . $connection-&gt;error . ']');
  }
  
  echo '&lt;select class = "toolbarDropdown" id = "toolbarDropdown-MultipleAccounts"&gt;';
  
      while ($row = $result-&gt;fetch_array()) {
          echo '&lt;option value="'.$row["clientId"].'"&gt;'.$row["studentFirstName"].' '.$row["studentLastName"].'&lt;/option&gt;';
      }
  
  echo '&lt;/select&gt;';
  </code></pre>