Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title> test Document <?php echo $_GET['id']?></title>
- </head>
- <body>
- <?php echo 'Document N°' . $_GET['id']; ?>
- <!-- ça marche s'il y a que la partie au dessus -->
- <!-- CONNEXION BASE DE DONNEES -->
- <?php
- try
- {
- $bdd = new PDO('mysql:host=localhost;dbname=atlas;charset=utf8', 'root', 'root');
- }
- catch(Exception $e)
- {
- die('Erreur : '.$e->getMessage());
- }
- $req = $bdd->prepare('SELECT * FROM texte WHERE id = :iddoc');
- $req->execute(array('iddoc' => $_GET['id']));
- while ($document = $req->fetch())
- {
- echo $document['auteur'] ;
- }
- $req->closeCursor();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement