Bonjour,
Je suis en train de travailler sur un récapitulatif de petites annonces sur un espace client, le client a, à partir de là, la possiblilité de supprimer ou de modifier son annonce, pour cela il faut que je récupère l'identifiant de l'annonce:
Mon souci est de récupérer le $i, mais e n'ai aucune idée de comment procéder, pouvez-vous m'eclairer? merci
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<?php $_SESSION['id_ann'] = array(); $i=0;do { if ($row_immo ['id_cat']==1){$table='AUTOMOBILES';} if ($row_immo ['id_cat']==2){$table='IMMOBILER';} if ($row_immo ['id_cat']==3){$table='EMPLOIS';} if ($row_immo ['id_cat']==4){$table='RENCONTRES';} if ($row_immo ['id_cat']==5){$table='BONS PLANS';} if ($row_immo ['id_cat']==6){$table='DIVERS';} if ($row_immo ['id_cat']==7){$table='2 ROUES';} if ($row_immo ['id_cat']==8){$table='VACANCES';} if ($row_immo ['id_cat']==9){$table='ANIMAUX';} if ($row_immo ['id_cat']==10){$table='OFFICIERS MINISTERIELS';} $i=$i+1; $_SESSION['id_ann'][$i]=$row_immo['id_annonce']; ?> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="497" align="left" valign="middle"><div align="left" class="titreBleu"><? echo $row_immo['id_annonce'] ?></div></td> <td width="10" align="left" valign="middle"> </td> <td colspan="2" align="center"><div align="left" class="titreBleu"> <div align="center" class="Navigation"><span class="Style1">Catégorie :</span> <? echo $table?> </div> </div></td> </tr> <tr> <td width="497" align="left" valign="middle"><div align="left" class="NpagesForm"><? echo Tronquer_Texte($row_immo['texte'],70);?></div></td> <td width="10" align="left" valign="middle"> </td> <td colspan="2" align="center" class="NpagesForm"> </td> </tr> <tr> <td width="497" class="PetiteBleue"><? echo dateswitch( $row_immo['date']) ?></td> <td width="10" class="PetiteBleue"> </td> <td width="102" align="center"><span class="NpagesForm">MODIFIER</span></td> <td width="101" align="center"><span class="Style15"><span class="NpagesForm"><a href="supprAnnonce.php">SUPPRIMER</a></span></span></td> </tr> <tr> <td colspan="4"> </td> </tr> </table> <?php } while ($row_immo = mysql_fetch_assoc($immo)); ?>![]()








Répondre avec citation
Partager