diff options
Diffstat (limited to 'public/index.php')
-rw-r--r-- | public/index.php | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/public/index.php b/public/index.php index 9b8a61b..2409769 100644 --- a/public/index.php +++ b/public/index.php @@ -1,51 +1,3 @@ <html> <a href="/w/">w</a> -</html> - -<?php - -try -{ - $bdd = new PDO('mysql:host=localhost;dbname=wcms;charset=utf8', 'root', ''); -} -catch(Exception $e) -{ - die('Erreur : '.$e->getMessage()); -} - -// $reponse = $bdd->query('SELECT nom, age FROM art2 WHERE nom = \'eddie\''); - -// while ($donnees = $reponse->fetch()) -// { -// echo $donnees['nom'] . ' a ' . $donnees['age'] . ' ANS<br />'; -// } - -// $reponse->closeCursor(); - -// $req = $bdd->prepare('SELECT nom, age FROM art2 WHERE age = 23 '); -// $req->execute(array($_GET['possesseur'], $_GET['prix_max'])); - -// echo '<ul>'; -// while ($donnees = $req->fetch()) -// { -// echo '<li>' . $donnees['nom'] . ' (' . $donnees['prix'] . ' EUR)</li>'; -// } -// echo '</ul>'; - -// $req->closeCursor(); - -$req = $bdd->prepare('SELECT * FROM art WHERE id = :id '); -$req->execute(array('id' => 'articlet')); - -echo '<ul>'; -while ($donnees = $req->fetch()) -{ - echo '<li>' . $donnees['titre'] . ' (' . $donnees['id'] . ' ANS)</li>'; -} -echo '</ul>'; - -$req->closeCursor(); - - - -?>
\ No newline at end of file +</html>
\ No newline at end of file |