title: Error pulling data to dropdown menu from a MySQL database
body: <p>it's me again.
  I am trying to make a dropdown menu that will request it's data from a MySQL database (<code>rows: category_id(a_i), category</code>) and display it in the dropdown menu. When new rows are added, the dropdown menu should expand to house them. This is the code I've created so far:</p>
  
  <pre><code>&lt;select&gt;
      &lt;select name="submit" id="category"&gt;
          &lt;option&gt;Select category&lt;/option&gt;
  &lt;?php
      $query=$db-&gt;prepare("SELECT * FROM categories");
      $query-&gt;execute();
      while($rows=mysql_fetch_array($query)){
  ?&gt;
          &lt;option value="&lt;?php echo $rows['']; ?&gt;"&gt;&lt;/option&gt;
  &lt;?php
      }
  ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>db variable: </p>
  
  <pre><code>&lt;?php
  $db =mysqli_connect('localhost','xxx','xxx','xxx') or die('error with connection');
  ?&gt;
  </code></pre>
  
  <p>However this code displays this error that I'm unable to fix on my own:
  Call to undefined method mysqli::mysqli_query()</p>