Guest User

Untitled

a guest
Jun 21st, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. $server = "localhost";
  4. $username = "root";
  5. $password = "";
  6. $name = "login_system";
  7.  
  8. $con = mysqli_connect("localhost","username","","loginsystem");
  9. if (mysqli_connect_errno())
  10. {
  11. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  12. }
  13.  
  14.  
  15. ?>
  16.  
  17. <?php
  18. include'dbh.php';
  19. ?>
  20. <!DOCTYPE html>
  21. <html>
  22. <head>
  23. <title> It is index 3</title>
  24. </head>
  25. <body>
  26. <?php
  27. global $con;
  28. $sql = "SELECT * FROM users;";
  29. $result = mysqli_query($con,$sql );
  30. $resultCheck = mysqli_num_rows($result);
  31.  
  32. if ($resultCheck > 0){
  33. while($row = mysqli_fetch_assoc(result)){
  34. echo $row['useruid'] . "<br>";
  35. }
  36. }
  37. ?>
  38.  
  39. </body>
  40. </html>
Add Comment
Please, Sign In to add comment