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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>affichage du resultat des produit en enchère</title>
</head>
<body>
<?php
// information pour la connection à le DB
include("Connections/connexion.php");
// requête SQL qui compte le nombre total d'enregistrement dans la table et qui
//récupère tous les enregistrements
$select =
"SELECT * FROM produit_enchere WHERE pseudo = '".$_SESSION['pseudo']."'"
;
$result = mysql_query($select) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
?>
<h2>Mes produits actuellement en enchère sont: </h2>
<?php
// si on a récupéré un résultat on l'affiche.
if($total) {
// debut du tableau
echo '<table bgcolor="#FFFFFF">'."\n";
// première ligne on affiche les titres
echo '<tr>';
//echo '<td bgcolor="#669999"><b><u>pseudo</u></b></td>';
echo '<td bgcolor="#669999"><b><u>nom_prod</u></b></td>';
echo '<td bgcolor="#669999"><b><u>type_prod</u></b></td>';
echo '<td bgcolor="#669999"><b><u>categorie_prod</u></b></td>';
echo '<td bgcolor="#669999"><b><u>desc_prod</u></b></td>';
echo '<td bgcolor="#669999"><b><u>nom_img</u></b></td>' ;
echo '<td bgcolor="#669999"><b><u>prix_depart</u></b></td>';
echo '<td bgcolor="#669999"><b><u>duree_enchere</u></b></td>';
echo '<td bgcolor="#669999"><b><u>type_enchere</u></b></td>';
/* echo '<td bgcolor="#669999"><b><u>prix_min</u></b></td>';
echo '<td bgcolor="#669999"><b><u>le_pas</u></b></td>';
echo '<td bgcolor="#669999"><b><u>delais_pas</u></b></td>' ;*/
echo '</tr>'."\n";$i=1;
// lecture et affichage des résultats
while($row = mysql_fetch_array($result)) {
?><form name="bouton" method="post" action="index2desc.php"><?php
echo '<tr>';
/*echo '<td bgcolor="#CCCCCC">'.$row["pseudo"].'</td>';*/
echo '<td bgcolor="#CCCCCC">'.$row["nom_prod"].'</td>'; /*$_SESSION["nom_prod"]= $row["nom_prod"]; $i++;*/
echo '<td bgcolor="#CCCCCC">'.$row["type_prod"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["categorie_prod"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["desc_prod"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["nom_img"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["prix_depart"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["duree_enchere"].'</td>';
echo '<td bgcolor="#CCCCCC">'.$row["type_enchere"].'</td>';
/* echo '<td bgcolor="#CCCCCC">'.$row["prix_min"].'</td>';*/
/*echo '<td bgcolor="#CCCCCC">'.$row["le_pas"].'</td>';*/
/* echo '<td bgcolor="#CCCCCC">'.$row["delais_pas"].'</td>';*/
$nom_prod= $row["nom_prod"];
echo '<td bgcolor="#CCCCCC">'?><p><input type="hidden" name="nom_prod" value= $nom_prod></p>
<p><input type="submit" name="voir" value="voir"></p>
<?php '<td>' ;
echo '</tr>'."\n";
?></form> <?php
}
echo '</table>'."\n";
// fin du tableau.
}
else echo 'Pas d\'enregistrements dans cette table...';
// on libère le résultat
mysql_free_result($result);
?>
</body>
</html> |
Partager