Guest User

Untitled

a guest
Jun 23rd, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2.    
  3.     $SQL_HOST = "localhost";
  4.     $SQL_USER = "root";
  5.     $SQL_PASS = "";
  6.     $SQL_DB = "jbcash";
  7.    
  8.     $sql = new mysqli($SQL_HOST, $SQL_USER, $SQL_PASS, $SQL_DB);
  9.    
  10.     $result = $sql->query("SELECT * FROM jbcash ORDER BY cash DESC LIMIT 15;");
  11.    
  12. ?>
  13. <html>
  14. <body>
  15. <title>Jailbreak Cash Top15</title>
  16. <body style="background-color:gray;">
  17. <center>
  18. <table border="1">
  19.     <tr>
  20.         <th>Rank</th>
  21.         <th>Name</th>
  22.         <th>Cash</th>
  23.     </tr>
  24. <?php
  25.     $row = 0;
  26.    
  27.     while(($data = $result->fetch_array())) {
  28. ?>
  29.     <tr>
  30.         <td><?= ++$row ?></td>
  31.         <td><?= $data['name'] ?></td>
  32.         <td><?= $data['cash'] ?></td>
  33.     </tr>
  34. <?php
  35.     }
  36.    
  37.     $result->close();
  38.     $sql->close();
  39. ?>
  40. </table>
  41. </center>
  42. </body>
  43. </html>
Add Comment
Please, Sign In to add comment