Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2.     header('Content-Type: text/html; charset=utf-8');
  3.  
  4.     $servername = "localhost";
  5.     $username = "seulogin";
  6.     $password = "suasenha";
  7.     $dbname = "nomedobanco";
  8.  
  9.     $mysqli = new mysqli($servername, $username, $password, $dbname);
  10.     $mysqli->set_charset("utf8");
  11.  
  12.     $dogid = $_POST["Dog_id"];
  13.     $hash = $_POST["hash"];
  14.  
  15.     $sql3 = mysqli_query("SELECT * FROM ranking ORDER BY score DESC LIMIT 10") or die("Could not allocate information!");
  16.     $rank = 0;
  17.     while($row = mysqli_fetch_array($sql3)) {
  18.         $rank++;
  19.         echo $row['user']. ";" .$row['score'] .";";
  20.     }
  21.  
  22.     $mysqli->close();
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement