Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>HideNSeek: Cashmod Top 50</title>
  4.                                                
  5. <link rel="stylesheet" href="cs.css" type="text/css">
  6. </head>
  7. <?php
  8.  
  9.     $top  = 50;
  10.     $host = "localhost";
  11.     $user = "root";
  12.     $pass = "";
  13.     $dba = "cashmod";
  14.  
  15.     $db = mysql_connect($host, $user, $pass);
  16.     mysql_select_db($dba, $db);
  17. ?>
  18. <body topmargin="0" leftmargin="-2">
  19. <basefont size="-1" face="MS GOTHIC">
  20. <table width="700" cellpadding="0" cellspacing="0">
  21. <tr><td align='center' colspan='13' class='catHead'><span class="genmed"><b>Point-System Ranking TOP 50</b></span>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td class="row1" align="center">rank</td>
  26. <td class="row1" align="center">name</td>
  27. <td class="row1" align="center">cash</td>
  28. </tr>
  29. <?
  30. $i = 1;
  31. $result = mysql_query("SELECT * FROM cashmod ORDER BY data DESC", $db);
  32. if ($myrow = mysql_fetch_array($result))
  33. {
  34.     do
  35.     {
  36.         if($i > $top)
  37.         {
  38.             break;
  39.         }
  40.  
  41.     printf( "<tr><td align='center'>%s</td><td>%s</td><td align='center'>%s</td></tr>\n", $i, $myrow["name"], $myrow["data"] );
  42.     $i++;
  43.  
  44.     }
  45.      while ($myrow = mysql_fetch_array($result));
  46. }
  47. ?>
  48. </table>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement