Bonjour,

Je suis actuellement entrain de réaliser un site web, dans celui-ci j'ai une page envoi qui me permet d'envoyer des mails.
Dans cette pas je doit afficher une liste avec les données de ma base de données. Pour afficher cette liste j'ai un bouton radio.
Normalement quand je sélectionne mon second bouton radio je devrais avoir la liste qui s'affiche juste au dessus de mon bouton "Envoyer", mais ma liste ne s'affiche pas.

Voici mon code php:
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
<form name='Menu' method='post' action="<?php echo $_SERVER[PHP_SELF]; ?>">
		<div id="menuho">
			<!--Menu horizontale-->
			<ul>
				<li><a href="envois_mailling.php" style="color: #F68220;" title="Envoi">Envoi</a></li>
				<li><a href="suivi.php" style="color: #FFFFFF;" title="Suivi">Suivi</a></li>
			</ul>
		</div>
	</form>
	<form name='Campaign' method='post' action="<?php echo $_SERVER[PHP_SELF]; ?>">
		<br /><br /><br /><br />
		<div>
			<div class="titre_page">Envois du mailing :</div>
			<div class="form_marge_left2"></div>
			<div class="obligatoire" style="text-align:left;font-size:14px">Choisir la campagne souhaité :</div>
			<div class="form_marge_content3" >
			<br /><br />
				<p>
					<label class="labeldevis obligatoire" style="font-size:12px">Selectionner la campagne pour l'envois :</label>
					<select class="input inputCbo" name="campaignID" onChange="Campaign.submit();">
						<?php
							/*Remplissage de la liste déroulante*/
							$req= "SELECT M.campaignID, campaign_name FROM campaign C, list_campaign M WHERE C.campaignID = M.campaignID GROUP BY campaign_name";
					        $res = mysqli_query($db_link_suivi_clients, $req) or die (mysqli_error($db_link_suivi_clients));
							/*Valeur afficher au début*/
							echo '<option value="" >--Choisir une campagne--</option>';
							$selected = ' "selected=selected" ' ;
							while($val=mysqli_fetch_array($res)) {
								$sel = ($val["campaignID"] == $_POST['campaignID']) ? $selected  : '' ;
								echo "<option value='". $val["campaignID"]. "' $sel >".$val["campaign_name"]."</option>\n";
							}
						?>
					</select>
				</p>
			</div>
		</div>
	</form>
	<form name='Importation' method='post' action="<?php echo $_SERVER[PHP_SELF]; ?>">
		<input type="hidden" name="action" value="mailling">
		<input type="hidden" name="campaignID" value="<?php echo $_POST['campaignID']; ?>"/>
			<div>
				<br /><br />
				<p>
					<table cellspacing="0" cellpadding="0">
						<tr>
							<td><label class="labeldevis obligatoire" style="font-size:12px">Choix du nombre de contact</label></td>
							<td>
								<input name="tous" type="radio" style="width:25px;" checked="checked" value="tous" onclick="cache()"/>
							</td>
							<td><label style="vertical-align:center;" style="font-size:12px" >TOUS</label></td>
							<td>
								<input name="tous" type="radio" style="width:25px;" value="selection" onclick="affiche()"/>
							</td>
							<td><label style="vertical-align:center;" style="font-size:12px" >Sélectioner vos contacts</label></td>
						</tr>
					</table>
				</p>
				<br /><br />
 
	<?php
	var_dump($_POST);
	$tous= $_POST['tous'];
 
	if ($tous=='selection')
				{
 
					$requete = "SELECT C.mail FROM list_campaign M, contact C WHERE M.contactID=C.contactID AND M.campaignID='". $_POST['campaignID']. "'";
					$res_fields = mysqli_query($db_link_suivi_clients,$requete) or die ('Erreur SQL ! '.$requete.'<br />'.mysqli_error($db_link_suivi_clients));
					while ($data_fields = mysqli_fetch_array($res_fields)) 
					{
						$element_1 .= '<option value="'. $data_fields['contactID'] .'">'. $data_fields['contact_mail'] .'</option>' ;
						$entete_table .= '<td nowrap="nowrap">'.$data_fields['contact_mail'].'</td>';
					} 
					?>
					<div style="" id="Importation">
						<form  name='Import' method='post' action="<?php echo $_SERVER[PHP_SELF]; ?>">
							<input type="hidden" name="action" value="choix">
							<input type="hidden" name="date" value="<?php echo date("y/m/d"); ?>">
							<input type="hidden" name="campaignID" value="<?php echo $_POST['campaignID']; ?>"/>
								<div class="form_marge_left2"></div>
								<div class="form_marge_content2" >
									<p style="margin: 0px 0 20px 0;">
										<div style="border:1px solid #000; width:550px; height:150px; overflow:auto;">
											<?php 
												echo '<table style="width:100%;" cellspacing="5">';
												echo '<tr style="background-color:#000; color:#fff; text-weight:bold;" >'.$entete_table.'</tr>'; 
												// ici rajouter le contenu de visualisation
												echo '</table>';
											?>
										</div>
									</p>
								</div>
						</form>
					</div>
					<?php
				}
				?>
				<center><p>
					<input class="form_submit" type="submit" name="Envoyer" value="Envoyer" />
				</p></center>	
			</div>
	</form>
 
 
<script type = "text/javascript">
function affiche(){
alert (document.getElementById("Importation").style.display);
 
if (document.getElementById("Importation").style.display == 'none'){
//alert ('test');
document.getElementById("Importation").style.display = 'block';
//document.forms["Importation"].submit();
}
}
 
function cache(){
 
if (document.getElementById("Importation").style.display == 'block'){
alert ('test');
document.getElementById("Importation").style.display = 'none';
//document.forms["Importation"].submit();
}
 
}
Merci d'avance pour vos réponses.

Bonne matinée.