1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
<?php
try
{
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
$bdd = new PDO('mysql:host=localhost;dbname=jeux', 'root', '', $pdo_options);
$req = $bdd->prepare('SELECT * FROM jeux WHERE typejeux = ?');
$req->execute(array('fps'));
$row = array();
while($donnees = $req->fetch())
{
$row[] = $donnees;
}
for($i=1; $i<11; $i++)
{
$personne = "Personne $i";
?>
<div class="gamer" name="gamer" id="player<?php echo $i ?>" style="display: block;">
<?php
while($row[3] == $personne)
{
?>
<div class="game">
<div class="name"><?php echo $row[4]; ?></div>
<span class="jeux"><?php echo $row[5]; ?></span>
<a href="" class="level"><?php echo $row[7]; ?></a>
<span class="team"><?php echo $row[6]; ?></span>
</div>
<?php
}
?>
</div>
<?php
}
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
?> |
Partager