Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. include 'db.php';
  4.  
  5. $user_check_query = "SELECT * FROM users";
  6. $result = mysqli_query($db, $user_check_query);
  7. $user = mysqli_fetch_assoc($result);
  8.  
  9. ?>
  10. <table>
  11. <?php
  12. while ($row = $result->fetch_assoc()) { ?>
  13. <tr>
  14. <td><?php $row['first_name']?></td>
  15. <td><?php $row['last_name']?></td>
  16. <td><?php $row['email']?></td>
  17. </tr>
  18. <?php } ?>
  19. </table>
  20.  
  21. //No way sitas veikia :D
  22. if (count($users) > 0): ?>
  23. <div class="error">
  24. <?php foreach ($users as $users) : ?>
  25. <p><?php echo $users; ?></p>
  26. <?php endforeach ?>
  27. </div>
  28. <?php endif ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement