1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <?php
//Connexion au serveur
$conn = mssql_connect("XXXXXXX","sa","XXXXXXX") or die('Erreur de connexion');
//Sélection de la base de données
$db= mssql_select_db('catalogue',$conn) or die('Erreur de sélection de la base de données');
?>
<html>
<head>
<title>Récupération de données
</title>
<link rel="stylesheet" type="text/css" href="styleDevis.css" />
</head>
<body>
<div class="bandeau"> Fiche du Produit
</div>
<div class="contenu">
<?php
$req3 = ("Select categorie_nom, famille_nom, marque_nom from categorie, famille, marque, produit where categorie.categorie_id = produit.produit_categorie and famille.famille_id=produit.produit_famille and marque.marque_id=produit.produit_marque and produit_id ='".$_POST['produits']."'");
$req = "SELECT * FROM produit where produit_id ='".$_POST['produits']."' ORDER BY produit_nom";
$req4 = "SELECT * from caracteristique, descriptif where caracteristique.caracteristique_id = descriptif.specification_id and produit_id='".$_POST['produits']."'";
$res4 = mssql_query($req4);
$row4 = mssql_fetch_array($res4);
$res = mssql_query($req);
$row= mssql_fetch_array($res);
$res3 = mssql_query($req3);
$row3= mssql_fetch_array($res3);
?>
<center>
<img src=showimage.php?produit_id=<?php echo $row['produit_id'];?> alt="im" />
</center> <br />
<table colspan ="100%">
<tr>
<td colspan="98%" align="center" color="mintcream"><b>
<?php echo $row['produit_nom']; ?></b></td>
<td><i>Référence :
<?php echo $row['produit_ref']; ?></i></td>
</tr>
<tr>
<td colspan="50%"><i>Catégorie :
<?php echo $row3['categorie_nom']; ?></i></td>
<td colspan="25%"><i>Famille :
<?php echo $row3['famille_nom'];?></i></td>
<td colspan="25%"><i>Marque :
<?php echo $row3['marque_nom'];?></i></td>
</tr>
<tr>
<td colspan="100%">
<?php echo $row['produit_caraPrincipal'];?></td>
</tr>
<tr>
<td colspan="100%">
<ul><br />
<?php while($row4){ echo '<li><b>'.$row4['caracteristique_nom'].'</b> : '.$row4['descriptif_description'].'</li>'; $row4 = mssql_fetch_array($res4);} ?>
</ul></td>
</tr>
<tr>
<td colspan="100%">
<?php echo $row['produit_commentaire']; ?></td>
</tr>
</table>
</div>
</body>
</html> |
Partager