Displaying more than one result


For this i will be using the rmb members system so here we go.

PHP Code
  1. <?php
  2. session_start();
  3. include "config.php";
  4.  
  5. $fetch = mysql_query(SELECT * FROM `members` ORDER BY `username` ASC);
  6. while ($array = mysql_fetch_array($fetch)
  7. {
  8. echo ("- $array[username]<br>");
  9. )


thats the whole code.

PHP Code
  1. while ($array = mysql_fetch_array($fetch)
  2. {
  3. echo ("- $array[username]<br>");
  4. )

This part loops the query so instead of displaying 1 result it will keep looping until it gets all the results

Thats it for my tutorial check out for more by me soon. Including the User System forum add-on
SkillMaster's Avatar
Views:
2,310
Rating:
There are currently no comments for this tutorial, login or register to leave one.