title: php get info from mysql
body: <p>So by the way i want to get the nickname of member by faction id. but its not printing name. whats wrong with my code? when i print $nickname its not giving me anything too.</p>
  
  <pre><code>&lt;?php 
  require 'db.php';
  session_start();
  
  $result = $mysqli-&gt;query("SELECT nickname FROM members WHERE fraction='3'");
  
  print($result-&gt;num_rows);
  ?&gt;
    &lt;div class="form"&gt;
  
        &lt;ul class="tab-group"&gt;
          &lt;li class="tab"&gt;&lt;a href="#lspd"&gt;LS-PD&lt;/a&gt;&lt;/li&gt;
          &lt;li class="tab active"&gt;&lt;a href="#ballas"&gt;BALLAS&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
  
        &lt;div class="tab-content"&gt;    
          &lt;div id="ballas"&gt;   
            &lt;h1&gt;Ballas&lt;/h1&gt;
  
            &lt;form action="index.php" method="post" autocomplete="off"&gt;
  
            &lt;div class="top-row"&gt;
              &lt;div class="field-wrap"&gt;
                &lt;label&gt;
                  Name&lt;span class="req"&gt;*&lt;/span&gt;
                &lt;/label&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;?php
            if ($result-&gt;num_rows &gt; 0) 
            {
              while($row = $result-&gt;fetch_assoc()) 
              {
                echo "&lt;p class='monitoring-name'&gt;" . $row['nickname'] . "&lt;/p&gt;&lt;br&gt;";
              }
            } 
            ?&gt;
            &lt;/form&gt;
          &lt;/div&gt;  
        &lt;/div&gt;&lt;!-- tab-content --&gt;
  
  &lt;/div&gt; &lt;!-- /form --&gt;
  </code></pre>