Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try
- {
- $connstrg = ("mysql:host=localhost;dbname=loterie");
- $user = ("root");
- $valide = true;
- $PDO = new PDO($connstrg,$user);
- }
- catch (Exception $ex)
- {
- $msg = "Une erreur ces produit à la ligne " . $ex->getLine() . " Dans le fichier " . $ex->getFile() . " Le message d'erreur est " . $ex->getMessage();
- echo $msg;
- $valide = false;
- }
- //si aucune erreur de connexion
- if($valide)
- {
- $query = ("CALL select_joueur();");
- $prep =$PDO->prepare($query);
- //echo json_encode($prep->errorInfo());
- $prep->execute();
- if($resultat=$prep->fetch())
- {
- echo "<div class='joueur' align=center>" . $resultat["name"] . "</div><br>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement