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
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Mon Formulaire</title>
</head>
<body>
<?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=madbname;charset=utf8', 'root', '');
}
catch (Exception $e)
{
die('Erreur :' . $e->getmessage());
}
?>
<p>
Salut
</p>
<?php
// Récupération des données de la table t_Players
$reponse = $bdd->query('SELECT * FROM T_Users');
//$donnees = $reponse->fetch();
while ($donnees = $reponse->fetch())
{
?>
<p>
<strong>ID</strong> : <?php echo $donnees['pl_ID']; ?><br/>
Prénom : <?php echo $donnees['pl_Prenom']; ?><br/>
Nom : <?php echo $donnees['pl_Nom']; ?><br/>
</p>
<?php
}
$reponse->closecursor(); // Termine le traitement de la requête
?>
</body>
</html> |