View difference between Paste ID: BVSSN1DY and 4bp8aDwp
SHOW: | | - or go back to the newest paste.
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"];
12+
	$query = "SELECT * FROM ranking ORDER BY score DESC LIMIT 10";
13-
    $hash = $_POST["hash"];
13+
    $sql3  = mysqli_query($mysqli,$query);
14
	$rank = 0;
15-
	$sql3 = mysqli_query("SELECT * FROM ranking ORDER BY score DESC LIMIT 10") or die("Could not allocate information!");
15+
16
		$rank++;
17
		echo $row['user']. ";" .$row['score'] .";";
18
	}
19
20
    $mysqli->close();
21
?>