Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2. try
  3. {
  4.         $bdd = new PDO('mysql:host=localhost;dbname=upload', 'upload', 'uploads');
  5. }
  6. catch(Exception $e)
  7. {
  8.         die('Erreur : '.$e->getMessage());
  9. }
  10. //$_GET['id'] = (int) $_GET['id'];
  11. echo $_GET['id'];
  12. $reponse = $bdd->prepare('SELECT * FROM liste WHERE id= ?');
  13. $reponse->execute(array($_GET['id']));
  14. //$reponse->execute(array("1"));
  15. while ($donnees = $reponse->fetch())
  16. {
  17.         echo $donnees['nom_or'];
  18. }
  19.  
  20. $reponse->closeCursor();
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement