Bonjour

j'ai un soucis sur un code qui n'affiche pas les enregistrements en base de donnée !
l'enregistrement en BDD se fait bien !

le code du script qui me pose probleme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 
<?php
if ($_GET['action']=="suppitem")
	{
	$query="DELETE FROM cat_produits WHERE compteur='$compteur'";
	$result_delete_item = mysql_query($query,$db);
	echo "<span><img src='images-main/icon/actif.gif'> L'article a été supprimé.</span><br><br>";
	}
if ($_GET['action']=="edititem")
	{
	if (($_POST['SubmitItem']=="Valider") and ($_POST['titre']!="") and ($_POST['description']!="") and ($_POST['prix']!=""))
		{
		$query="UPDATE cat_produits SET categorie='$listecat', titre='$titre', description='$description', prix='$prix', promotion='$promotion', devise='$devise', poids='$poids', shipping='$shipping' WHERE compteur='$compteur'";
		$res_modif = @mysql_query($query,$db);
		echo "<span><img src='images-main/icon/actif.gif'> L'article a été modifié.</span><br><br>";
		}
	else
		{
		$query="SELECT * FROM cat_produits WHERE compteur='$compteur'";
		$res_modif_item = @mysql_query($query,$db);
		$list_modif_item=@mysql_fetch_row($res_modif_item);
		if ($listecat=="") {$listecat="0";}
		echo "<form name='form' method='post' action=''>";
		echo "<table width='100%' border='0' cellspacing='3' cellpadding='0' class='texte'><tr>";
		echo "<td width='30%' align='right' valign='top'></td><td>";
		echo "<select name='listecat'>";
		echo "<option value='0'>Racine du site</option>";
		$query="SELECT * FROM cat_categ ORDER BY nom ASC";
		$res_compteur = @mysql_query($query,$db);
		if (@mysql_num_rows($res_compteur)!=0)
			{
			$nbcompteur=mysql_num_rows($res_compteur);
			for ($i=0; $i<$nbcompteur; $i++)
				{
				$list_compteur=@mysql_fetch_row($res_compteur);
				$query="SELECT * FROM cat_categ WHERE inside='$list_compteur[3]'";
				$res_bout = @mysql_query($query,$db);
				if (@mysql_num_rows($res_bout)==0)
					{
					$tabmenu=""; $ligne="";
					$idliste=$list_compteur[3];
					while ($idliste!=0)
						{
						$query="SELECT * FROM cat_categ WHERE compteur='$idliste'";
						$res_idliste = @mysql_query($query,$db);
						$list_idliste=@mysql_fetch_row($res_idliste);
						$tabmenu[]="$list_idliste[0]";
						$idliste=$list_idliste[2];
						}
					$nbrtabmenu=count ($tabmenu);
					for ($t=$nbrtabmenu-1; $t>=0; $t--)
						{
						if ($t==$nbrtabmenu-1) {$ligne=$ligne . "$tabmenu[$t]";}
						else {
						$ligne=$ligne . " > $tabmenu[$t]"; }
						if ($tabfinal=="") {$tabfinal[]="$ligne";}
						else { if (in_array($ligne,$tabfinal)!=1) {$tabfinal[]="$ligne";} }
						}
					}
				}
			$nbrtabfinal=count ($tabfinal);
			$tabfinal[]=rsort($tabfinal);
			for ($f=$nbrtabfinal-1; $f>=0; $f--)
				{
				$tablastword= explode(" > ",$tabfinal[$f]); 
				$lastword=$tablastword[count($tablastword)-1];
				$query="SELECT compteur FROM cat_categ WHERE nom='$lastword'";
				$res_compteur_last_word = @mysql_query($query,$db);
				$list_compteur_last_word=@mysql_fetch_row($res_compteur_last_word);
				echo "<option value='$list_compteur_last_word[0]' "; if ($list_modif_item[1]=="$list_compteur_last_word[0]") {echo "selected";} echo ">$tabfinal[$f]</option>";
				}
			}
		echo "</select>";
		echo "</td></tr><tr>";
		echo "<td width='30%' align='right' valign='top'>Titre : </td>";
		echo "<td><input name='titre' type='text' size='40' maxlength='100' value='$list_modif_item[2]'></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Description : </td>";
		echo "<td><textarea name='description' cols='40' rows='8'>$list_modif_item[5]</textarea></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Prix : </td>";
		echo "<td><input name='prix' type='text' size='10' value='$list_modif_item[6]'></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Promotion : </td>";
		echo "<td><input name='promotion' type='text' size='10' value='$list_modif_item[7]'></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Devise :</td>";
		echo "<td><select name='devise'><option>€</option></select></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Poids de l'article (en Kg): <br><span class='tips'>(Si votre article fait 100 grammes, mettez 0.1)<br>Renseignez de champs si vous avez sélectionnez l'option 'frais de ports selon le poids total' dans la gestion des frais de ports</span></td>";
		echo "<td valign='top'><input name='poids' type='text' size='10' value='$list_modif_item[11]'></td>";
		echo "</tr><tr>";
		echo "<td align='right' valign='top'>Frais de ports : <br><span class='tips'>Renseignez de champs si vous désirez un prix fixe de frais de ports pour chaque article</span></td>";
		echo "<td valign='top'><input name='shipping' type='text' size='10' value='$list_modif_item[12]'></td>";
		echo "</tr><tr>";
		echo "<td align='right'>&nbsp;</td>";
		echo "<td><input type='submit' name='SubmitItem' value='Valider'></td>";
		echo "</tr></table></form><br><br>";
		}
	}
echo "<table width='100%' align='center' cellpadding='3' cellspacing='2'>";
echo "<tr align='center'>"; 
echo "<td width='30%'><strong>Catégorie</strong></td>";
echo "<td width='100'><strong>Titre</strong></td>";
echo "<td width='100'><strong>Description</strong></td>";
echo "<td><strong>Upload photo</strong></td>";
echo "<td width='70'><strong>Photo</strong></td>";
echo "<td width='70'><strong>Date insertion</strong></td>";
echo "<td width='30'><strong>Modifier</strong></td>";
echo "<td width='30'><strong>Supprimer</strong></td>";
echo "</tr>";
$query="SELECT compteur, categorie, titre, photo, description, prix, promotion, devise, DATE_FORMAT(date_ins, '%d-%m-%Y'), heure_ins, poids, shipping FROM cat_produits ORDER BY categorie ASC, date_ins DESC, heure_ins DESC";
$res_prod = @mysql_query($query,$db);
if (@mysql_num_rows($res_prod)!=0)
	{
	$nbrprod=mysql_num_rows($res_prod);
	/*$nbpage=ceil($nbrprod/10);
	if ($_GET['page']=="") {$page=1;}
	for ($i=0; $i<$nbrprod; $i++)
		{
		$list_prod=@mysql_fetch_row($res_prod);
		if ( ($i>=10*$page-10) and ($i<10*$page) )
			{*/
			if ($list_prod[1]!="0")
				{
				$query="SELECT nom FROM cat_categ WHERE compteur='$list_prod[1]'";
				$res_cat=@mysql_query($query,$db); $list_cat=@mysql_fetch_row($res_cat);
				}
			else {$list_cat[0]="Site à la racine";}
			echo "<tr>";
			echo "<td align='center'>$list_cat[0]</td>";
			echo "<td align='center'>$list_prod[2]</td>";
			echo "<td>$list_prod[4]</td>";
			echo "<td><FORM METHOD='POST' ENCTYPE='multipart/form-data' action='boutik_upload.php'><INPUT TYPE=FILE NAME='file'><input type='hidden' name='compteur' value='$list_prod[0]'><INPUT TYPE=SUBMIT NAME='upload_photo' value='Download'></FORM></td>";
			echo "<td>"; if ($list_prod[3]!="") { echo "<img src='../" . $list_prod[3] . "' width='70'><br>"; echo "<a href='boutik_delete.php?compteur=$list_prod[0]'>supprimer</a>"; } echo "</td>";
			echo "<td align='center'>$list_prod[8]</td>";
			echo "<td align='center'><a href=\"?menu=boutik_items&action=edititem&compteur=$list_prod[0]\"><img src='images-main/icon/ajoutpage2.gif' border='0' alt=\"Editer l'article $list_prod[2]\"></a></td>";
			echo "<td align='center'><a href=\"?menu=boutik_items&action=suppitem&compteur=$list_prod[0]\"><img src='images-main/icon/supprim.gif' border='0' alt=\"Supprimer l'article $list_prod[2]\"></a></td>";
			echo "</tr>";
			/*}*/
		}
echo "</table>";
	/*echo "<div align='right' class='texte'>Page "; 
	for ($j=1; $j<=$nbpage; $j++) { echo " <a href='index.php?page=boutik_items&amp;page=$j'>$j</a> "; }
	echo "</div>";
	}*/
?>
Si il faut plus de renseignement merci de me le dire !
Cordialement