Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Accueil</title>
- <link rel="stylesheet" href="style.css"/>
- <meta charset="utf-8"/>
- </head>
- <body>
- <div id="menu">
- <h1> Société LaFleur </h1>
- <h2><a href="index.php">Accueil</a></h2><hr>
- <?php
- $cnx = new PDO("mysql:dbname=lafleurv2;host=127.0.0.1; charset=UTF8", 'ts1', 'ts1');
- $sql = 'select cat_code, cat_libelle from categorie';
- foreach ($cnx->query($sql) as $row) {
- echo '<h3> <a href="catalogue.php?categ=' . $row['cat_code'] . '"/>' . $row['cat_libelle'] . '</a> </h3>';
- }
- ?>
- </div>
- <div id="page">
- <table id="prodListe">
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
- <?php
- $cnx = new PDO ('mysql:dbname=lafleurv2;host=127.0.0.1 ;charset=UTF8', 'ts1', 'ts1');
- $libcateg = $cnx->quote ($_GET['categ'] );
- $requete = 'select cat_libelle, pdt_ref, pdt_designation, pdt_prix, pdt_image
- from produit, categorie
- where cat_code = pdt_categorie
- AND pdt_categorie = '.$_GET['categ'];
- echo '<thead>
- <tr><th colspan="4">'.$_GET['categ'].'</th></tr>
- <tr><th>Photos</th><th>Référence</th><th>Désignation</th><th>Prix</th></tr>
- </thead>';
- foreach ($cnx->query($requete) as $row)
- {
- echo '
- <tr>
- <td><img src="Images/'.$row['pdt_image'].'.jpg"/></td>
- <td>'.$row['pdt_ref'].'</td>
- <td>'.$row['pdt_designation'].'</td>
- <td>'.$row['pdt_prix'].'</td>
- </tr>';
- }
- ?>
- </body>
- </div>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement