Salut, j'ai un tableau où j'ai récupéré des données de ma base de données,
devant chaque ligne j'ai un checkbox. J'ai un bouton valider en dessous du tableau et je veux afficher dans un autre tableau les lignes sélectionnées par la checkbox lorsqu'on clique sur le bouton.
Mon code ci-dessous ne me renvoie pas le résultats attendus et je sais vraiment pas où se situe le problème.

Formulaire du premier tableau :
Code html : 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
<div id="titre_tab">CONSULTATION DES RAPPORTS D'ACTIVITES HEBDOMADAIRES
<form method="POST" action="consultation_rah.php" name="consultation_rah" onSubmit="return verifier();return verif(formule)" enctype="multipart/form-data" >
<div id="fieldset1">
<fieldset style="width:360px;">
       <legend><strong>SELECTIONNER</strong></legend> 
	    <p>
		 <label for="id"><strong>Date 1 : </strong> </label>
         <input type="date" name="date1" id="date1" tabindex="10" /><br />
		 <label for="id"><strong>Date 2 : </strong> </label>
         <input type="date" name="date2" id="date2" tabindex="10" /><br /><br />
		 <input type="radio" name="Choix" value="Generale" checked>Generale
		 <input type="radio" name="Choix" value="Suivi">Suivi
		 <input type="radio" name="Choix" value="Conclu">Termin&eacute;es
        </p>
</fieldset>
</div>
<fieldset id="consul" style="width:360px;">
       <legend><strong>OPTIONS</strong></legend> 
	    <p>
		<input type="submit" name="Valider" id="Valider" value="Valider" /> 
	   <input type="submit" name="Annuler" id="Annuler" value="Annuler" />  
        </p>
</fieldset> <br/>
</form>	
</div>

Resultat de l'affichage du premier tableau, selection des checkbox et requete pour afficher le deuxième tableau :

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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?php
include("connection_gescompta.php");
 $i=0;
//**************************************************************************************************************************************			
// Consultation Generale
if (isset($_POST['Valider']))
{
	$Choix  = $_POST['Choix'];
        //echo $Choix;
	if ($Choix == 'Generale')
	{
		echo '<table><tr>
		<th> RAM </th>
		<th> ID </th>
		<th>DATE </th>
		<th>PROJETS / TÂCHES</th>
		<th>DESCRIPTION</th>
		<th>ETAT D’AVANCEMENT	</th>
		<th>RESPONSABLE </th>
		<th>ETAT </th>
		<th>MODIFIER</th>
		<th>SUPPRIMER</th>
		</tr>';
		try
		{
		$date1 = $_POST['date1'];
		$date2 = $_POST['date2'];
			 $reponse = $bdd->query("SELECT 
	 a.id_rah,
     a.datejour,
	 a.projets_taches,
	 a.description,
	 a.avancement,
	 a.entite_responsable,
	 a.etat_tache
     FROM 
     rah a
	 where datejour between '$date1' and '$date2' order by a.datejour");
 
			while ($donnees = $reponse->fetch())
			{
				$i++;
				echo '<tr>';
					echo '
					
					<td><input type="checkbox" name="checkbox[]"  value ="<?php echo '.$donnees['id_rah'].'?>" /></td>
					<td>'. $donnees['id_rah'].'</td>
					<td>'. $donnees['datejour'].'</td>
					<td>'. $donnees['projets_taches'].'</td>
					<td>'. $donnees['description'].'</td>
					<td>'. $donnees['avancement'].'</td>
					<td>'. $donnees['entite_responsable'].'</td>
					<td>'. $donnees['etat_tache'].'</td>';
					echo'<td><a href="modifier_rah.php?modifier='.$donnees['id_rah'].'">Modifier</a></td>';
					echo'<td><a href="confirmation_sup_rah.php?supprimer='.$donnees['id_rah'].'"><img src="images/supprimer.jpg"></a></td>';
				echo '</tr>';
 
			}
			}
			catch(Exception $e)
            {
                 die('Erreur : '.$e->getMessage());
            }
 
			   }
 
 
			   echo '</table>';
 
//**************************************************************************************************************************************			 
 
			 // Consultation des RAH suivi
 
			     if ($Choix == 'Suivi')
	                 {
 
			      echo '<table><tr>
				<th> RAM </th>
				<th>DATE </th>
				<th>PROJETS / TÂCHES</th>
				<th>DESCRIPTION</th>
				<th>ETAT D’AVANCEMENT	</th>
				<th>RESPONSABLE </th>
				<th>ETAT </th>
				<th>MODIFIER</th>
				<th>SUPPRIMER</th>
				</tr>';
 
			try
			{
 
 
		$date1 = $_POST['date1'];
		$date2 = $_POST['date2'];
			 $reponse = $bdd->query("SELECT 
	 a.id_rah,
     a.datejour,
	 a.projets_taches,
	 a.description,
	 a.avancement,
	 a.entite_responsable,
	 a.etat_tache
     FROM 
     rah a
	 where datejour between '$date1' and '$date2' and
	 etat_tache = 'Suivi' order by a.datejour");
 
			while ($donnees = $reponse->fetch())
			{
				$i++;
				echo '<tr>';
					echo '
 
					<td><input  type="checkbox" name="checkbox[]"   value ="<?php echo '.$donnees['id_rah'].'?>" /></td>
					<td>'. $donnees['datejour'].'</td>
					<td>'. $donnees['projets_taches'].'</td>
					<td>'. $donnees['description'].'</td>
					<td>'. $donnees['avancement'].'</td>
					<td>'. $donnees['entite_responsable'].'</td>
					<td>'. $donnees['etat_tache'].'</td>';
					echo'<td><a href="modifier_rah.php?modifier='.$donnees['id_rah'].'">Modifier</a></td>';
					echo'<td><a href="confirmation_sup_rah.php?supprimer='.$donnees['id_rah'].'"><img src="images/supprimer.jpg"></a></td>';
				echo '</tr>';
			}
			}
			catch(Exception $e)
            {
                 die('Erreur : '.$e->getMessage());
            }
 
			   }
 
 
			   echo '</table>';
//**************************************************************************************************************************************			 
 
			 // Consultation des RAHTermin Termin&eacute;es
 
			     if ($Choix == 'Conclu')
	                 {
 
			      echo '<table><tr>
				<th> RAM </th>
				<th>DATE </th>
				<th>PROJETS / TÂCHES</th>
				<th>DESCRIPTION</th>
				<th>ETAT D’AVANCEMENT	</th>
				<th>RESPONSABLE </th>
				<th>ETAT </th>
				<th>MODIFIER</th>
				<th>SUPPRIMER</th>
				</tr>';
 
			try
			{
 
 
		$date1 = $_POST['date1'];
		$date2 = $_POST['date2'];
			 $reponse = $bdd->query("SELECT 
	 a.id_rah,
     a.datejour,
	 a.projets_taches,
	 a.description,
	 a.avancement,
	 a.entite_responsable,
	 a.etat_tache
     FROM 
     rah a
	 where datejour between '$date1' and '$date2' and
	 etat_tache = 'Conclue' order by a.datejour");
 
			while ($donnees = $reponse->fetch())
			{
				$i++;
				echo '<tr>';
					echo '
 
					<td><input type="checkbox" name="checkbox[]" value ="<?php echo '.$donnees['id_rah'].'?>" /></td>
					<td>'. $donnees['datejour'].'</td>
					<td>'. $donnees['projets_taches'].'</td>
					<td>'. $donnees['description'].'</td>
					<td>'. $donnees['avancement'].'</td>
					<td>'. $donnees['entite_responsable'].'</td>
					<td>'. $donnees['etat_tache'].'</td>';
					echo'<td><a href="modifier_rah.php?modifier='.$donnees['id_rah'].'">Modifier</a></td>';
					echo'<td><a href="confirmation_sup_rah.php?supprimer='.$donnees['id_rah'].'"><img src="images/supprimer.jpg"></a></td>';
				echo '</tr>';
			}
			}
			catch(Exception $e)
            {
                 die('Erreur : '.$e->getMessage());
            }
 
			   }
 
 
			 echo '</table>';
			 echo '<div id="form2">';
			 echo '<form method="POST" action="consultation_rah.php" name="consultation_rah" >';
			 echo ' <br/> <br/> <br/>';
			 echo '<fieldset id="consul_ram" style="width:360px;">';
			 echo ' <legend><strong>OPTIONS</strong></legend> ';
			 echo '<p>';
			 echo '<input type="submit" name="generer_ram" id="generer_ram" value="RAM" /> ';
			 echo ' <input type="submit" name="Annuler" id="Annuler" value="Annuler" />  ';
			 echo ' </p>';
			 echo '</fieldset> <br/>';
			 echo '</form>	';
			 echo '</div >';
			 }
/******************************************************************************************************************************/
               /**************** Traitement du RAM *************************************/
if (isset($_GET['generer_ram'])  && !empty($_GET['checkbox']))
	           {
 
			    $checkbox = array($_GET['checkbox']);
			     echo '<table><tr>
				<th>DATE </th>
				<th>PROJETS / TÂCHES</th>
				<th>DESCRIPTION</th>
				<th>ETAT D’AVANCEMENT</th>
				<th>RESPONSABLE </th>
				<th>ETAT </th>
				</tr>';
 
                 $tabCheckbox = array($_GET['checkbox']);
                 foreach ($tabCheckbox as $checkbox) 
				 {
                 $checkbox = htmlspecialchars($checkbox);
                 $reponse = $bdd->query("SELECT 
	             a.id_rah,
				 a.datejour,
				 a.projets_taches,
				 a.description,
				 a.avancement,
				 a.entite_responsable,
				 a.etat_tache
				 FROM 
				 rah a 
				 where a.datejour = '$checkbox' order by a.datejour");
 
				$donnees = $reponse->fetch();
				$i++;
				echo '<tr>';
					echo '
					<td>'. $donnees['datejour'].'</td>
					<td>'. $donnees['projets_taches'].'</td>
					<td>'. $donnees['description'].'</td>
					<td>'. $donnees['avancement'].'</td>
					<td>'. $donnees['entite_responsable'].'</td>
					<td>'. $donnees['etat_tache'].'</td>';
				echo '</tr>';
 
 
               }
 
       }
    else
	  { 
	     //echo "<script langage='javascript'>alert('Faites le choix d'une tache dans le RAH ...');</script>";
         //echo "Faites le choix d'une tache dans le RAH ...";
		 //redirect('consultation_rah.php'); 
	  }
 
 ?>
Un var_dump($_POST['checkbox']); à l'interieur de la condition
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
if (isset($_GET['generer_ram'])  && !empty($_GET['checkbox']))
	           {
			   }
a été fait mais je n'obtiens aucun résultat.

si quelqu'un peut m'aider!!!!! c'est très urgent!!!