1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| if (isset($_GET['produit'])) {
$ProduitCherch=mysql_real_escape_string($_GET['produit']);
$sql="SELECT*FROM Produit WHERE TypeProduit='$ProduitCherch'";
}
$result=mysql_query($sql, $cxn)
or die (mysql_error());
/*Afficher les résultats dans un tableau*/
$ProduitCherch = ucfirst($ProduitCherch);
$nomcategorie="SELECT DesignationCategorie FROM Categorie WHERE AbrvCategorie='$ProduitCherch'";
$resnomcategorie=mysql_query($nomcategorie, $cxn)
or die (mysql_error());
echo "<h2>Catégorie $resnomcategorie</h2>"; |