$sql='select score, player from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].' order by score desc limit '.$toDisp;
$db_game_mode=$_POST["game_mode"];
$db_difficulty=$_POST["difficulty"];
$db_dotsAmount=$_POST["dotsAmount"];
$db_pause=$_POST["pause"];
}
else
{
$db_game_mode="5p";
$db_difficulty="easy";
$db_dotsAmount=$_COOKIE["dotsAmount"];
$db_pause=$_COOKIE["pause"];
}
if(stristr($db_game_mode, "p") === FALSE)
{
$sql='select score, player from score where game_mode="'.$db_game_mode.'" and difficulty="'.$db_difficulty.'" and dots_amount='.$db_dotsAmount.' and pause='.$db_pause.' order by score desc limit '.$toDisp;
$unit="points";
}
else
{
$sql='select score, player from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].' order by score asc limit '.$toDisp;
}
else
{
$sql='select score, player from score where game_mode="'.$db_game_mode.'" and difficulty="'.$db_difficulty.'" and dots_amount='.$db_dotsAmount.' and pause='.$db_pause.' order by score asc limit '.$toDisp;
$unit="secondes";
}
$result = $database->query($sql);
$a=$result->fetchArray();
}
$result = $database->query($sql);
$a=$result->fetchArray();
if($a==false)
{
if($a==false)
{
$phrase= "Il n'y a pas encore de score pour ce mode de jeu.";