bonjour, j'ai un petit souci
j'affiche la liste de tous mes enregistrements
le code
ce qui marche très bien
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 <?php include( "config_server.php" ); $sql = "SELECT * from clients"; $req = @ mysql_query ( $sql ) or die ( 'Erreur requête !!!' ); ?> <table width="150%" border="0" style=" background-color:#ffffff; border:1px solid #000000; position:absolute; margin-top:25px; margin-left:5px;"> <?php while ( $data = @ mysql_fetch_array ( $req )) { ?> <tr> <td width=20% style=" text-align:left;font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#FFFFFF; "><a href="consult_clients_details.php?id=<?php echo $data[id] ?>"><?php echo $data[codeaffiliation] ?></a></td> <td width="20%" style=" text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#FFFFFF; "><?php echo $data[nom] ?></td> <td width="20%" style=" text-align:left; ;font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#FFFFFF; "><?php echo $data[prenom] ?></td> <td width="20%" style=" text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#FFFFFF; "><?php echo $data[questions] ?></td> <td width="20%" style=" text-align:left;font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#FFFFFF; "><?php echo $data[echeance] ?></td> </tr> <?php } ?> </table>
dans le code ci dessus j'appelle une page en passant par url l'id
je fais ceci pour afficher tous les champs
voici mon code
ceci marche aussi
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 <?php include( "config_server.php" ); // print($id); // $identifiant = $_GET['id']; $sql = "SELECT * FROM clients where id=$id" ; // On sélectionne le sujet avec l'url étant donné que la page est atteinte // comme cela view.php?id=X l'id est renseigné ! $req = @ mysql_query ( $sql ) or die ( 'Erreur requête !!!' ); // On execute la requête ! // Nous allons ressortir le message du sujet sur lequel nous avons cliquer : while ( $data = @ mysql_fetch_array ( $req )) { ?> <table width="90%" border="0" style="margin-left:30px;"> <tr> <td width=30%>Code affiliation : <?php echo $data[codeaffiliation] ?></td> <tr> <td width=30%>Code consultant : <?php echo $data[codeconsultant] ?></td> <tr> <td width=30%>Nom : <?php echo $data[nom] ?></td> <tr> <td width=30%>Prénom : <?php echo $data[prenom] ?></td> <tr> <td width=30%>Adresse : <?php echo $data[adresse] ?></td> <tr> <td width=30%>Localité : <?php echo $data[localite] ?></td> <tr> <td width=30%>Téléphone : <?php echo $data[telephone] ?></td> <tr> <td width=30%>Gsm : <?php echo $data[gsm] ?></td> <tr> <td width=30%>Email : <?php echo $data[email] ?></td> <tr> <td width=30%>Login : <?php echo $data[login] ?></td> <tr> <td width=30%>Mot de passe : <?php echo $data[pass_md5] ?></td> <tr> <td width=30%>Date entrée : <?php echo $data[dateentree] ?></td> <tr> <td width=30%>Date d'échéance : <?php echo $data[echeance] ?></td> <tr> <td width=30%>Accès forum : <?php echo $data[accesforum] ?></td> <tr> <td width=30%>Questions restantes : <?php echo $data[questions] ?></td> <tr> </tr> </table> <?php } ?>
ben ou est le problème vous allez me dire, ben c'est que j'ai mis un lien retour qui ramène vers la page ou il y a la liste de mes enregistrement et là ca me met impossible d'afficher la page
à mon avis cela vient de l'id mais je ne sais pas quoi faire pour y remédier
merci pour votre aide
Partager