Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. // Query all the users and return the results
  3. $users = $db->query("SELECT * FROM users")->results(); ?>
  4. <!-- create a table -->
  5. <table class="table table-striped">
  6. <thead>
  7. <tr>
  8. <th>Name (using echouser function)</th>
  9. <th>First/Last Name</th>
  10. <th>Username</th>
  11. <th>Email</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <?php foreach($users as $u){?>
  16. <!-- make a new row for each user -->
  17. <!-- the $u->fname us the $u from the foreach loop and the columname from the users table -->
  18. <tr>
  19. <td><?=echouser($u->id); //echouser function can be configured in the dashboard?></td>
  20. <td><?=$u->fname?> <?=$u->lname?></td>
  21. <td><?=$u->username?></td>
  22. <td><?=$u->email?></td>
  23. </tr>
  24. <?php }?>
  25. </tbody>
  26. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement