Advertisement
Guest User

Untitled

a guest
Sep 12th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <?php
  6. $servername = "localhost";
  7. $username = "suppixel_mysql";
  8. $password = "X";
  9. $dbname = "suppixel_perms";
  10.  
  11. // Create connection
  12. $conn = new mysqli($servername, $username, $password, $dbname);
  13. // Check connection
  14. if ($conn->connect_error) {
  15. die("Connection failed: " . $conn->connect_error);
  16. }
  17.  
  18. $sql = "SELECT name, id FROM groups";
  19. $result = $conn->query($sql);
  20.  
  21. if ($result->num_rows > 0) {
  22. // output data of each row
  23. while($row = $result->fetch_assoc()) {
  24. echo "Rank name: ".$row["name"]. "<br>";
  25. echo "<b><a href='show_perms.php?rank=";
  26. echo $row["id"];
  27. echo "'>Check perms here of ";
  28. echo $row["name"];
  29. echo "</b></a><br><br>";
  30. }
  31. } else {
  32. echo "0 results";
  33. }
  34. $conn->close();
  35. echo "<hr>";
  36.  
  37. ?>
  38.  
  39.  
  40.  
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement