Bonjour, j'ai un problème sur un formulaire, notamment avec les cases à cocher.
http://www.sri-valdoise.com/formulaire_inscription.php
Lorsque je valide le formulaire, les renseignements arrivent sur mon adresse email, mais les cases à cocher ne s'affichent pas du tout (ni lors du récapitulatif après validation). C'est à dire que je ne vois pas quelles sont les cases qui ont été cochées.

Le site est actuellement hébergé chez ovh, et l'année dernière, il était hébergé chez 1&1, et c'était exactement le même formulaire qui fonctionnait bien (seulement les textes ont changé). Je ne suis pas programmeur, développeur, spécialiste en codage, c'est un formulaire généré automatiquement...

Cette année, j'ai basculé ce site chez ovh, et le formulaire fonctionne, mais lors de validation, il affiche logiquement les champs renseignés par l'utilisateur (Mr, nom, prénom, société...) ainsi que les cases cochés par l'utilisateur. C'est ce qui se passait l'année dernière.
Maintenant chez ovh, il n'affiche pas les cases cochées et lorsque les champs renseignés arrivent sur ma messagerie, j'ai bien nom, prénom, société... mais pas du tout les cases cochées également.

Donc, j'imagine bien qu'il y a quelque chose qui coince, nom pas spécifiquement dans le code du formulaire, mais quelque chose en relation entre ce code et l'hébergement ovh. J'ai fait des recherches sur google, et j'ai vu un code php5 à placer dans le .htaccess, j'ai essayé mais ça met le site en carafe.
Il y a peut-être également un réglage à faire au niveau de la console d'administration ?

Comme je le dis, je ne suis pas expert en la matière, donc je sèche pour l'instant.

Je mets ci-dessous le code car j'imagine que c'est là-dedans qu'il doit y avoir un souci. Merci pour votre aide.


Ce Code se trouve avant la balise HEAD.
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
// Couleur du texte des champs si erreur saisie utilisateur
$color_font_warn="#FF0000";
// Couleur de fond des champs si erreur saisie utilisateur
$color_form_warn="#FFCC66";
// Ne rien modifier ci-dessous si vous n’êtes pas certain de ce que vous faites !
$list['f_1']=array("Mr","Mme","Melle");
$list['f_10']=array("ligne 1");
$list['f_11']=array("ligne 2");
$list['f_12']=array("ligne 3");
$list['f_13']=array("ligne 4");
$list['f_14']=array("ligne 5");
$list['f_15']=array("ligne 6");
$list['f_16']=array("ligne 7");
if(isset($_POST['submit'])){
	$erreur="";
	// Nettoyage des entrées
	while(list($var,$val)=each($_POST)){
	if(!is_array($val)){
		$$var=strip_tags($val);
	}else{
		while(list($arvar,$arval)=each($val)){
				$$var[$arvar]=strip_tags($arval);
			}
		}
	}
	// Formatage des entrées
	$f_2=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_2)));
	$f_3=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_3)));
	$f_4=strip_tags(trim($f_4));
	$f_5=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_5)));
	$f_6=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_6)));
	$f_7=trim(eregi_replace("[^0-9+]", "", $f_7));
	$f_8=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_8)));
	$f_9=trim(eregi_replace("[^0-9\ +]", "", $f_9));
// Verification des champs
	if($f_1==""){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Civilité &raquo; n'a pas été défini.</span>";
		$errf_1=1;
	}
	if(strlen($f_2)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Nom &raquo; est vide ou incomplet.</span>";
		$errf_2=1;
	}
	if(strlen($f_3)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Prénom &raquo; est vide ou incomplet.</span>";
		$errf_3=1;
	}
	if(strlen($f_4)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Email &raquo; est vide ou incomplet.</span>";
		$errf_4=1;
	}else{
		if(!ereg('^[-!#$%&\'*+\./0-9=?A-Z^_`a-z{|}~]+'.
		'@'.
		'[-!#$%&\'*+\/0-9=?A-Z^_`a-z{|}~]+\.'.
		'[-!#$%&\'*+\./0-9=?A-Z^_`a-z{|}~]+$',
		$f_4)){
			$erreur.="<li><span class='txterror'>La syntaxe de votre adresse e-mail n'est pas correcte.</span>";
			$errf_4=1;
		}
	}
	if(strlen($f_6)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Adresse &raquo; est vide ou incomplet.</span>";
		$errf_6=1;
	}
	if(strlen($f_7)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Code postal &raquo; est vide ou incomplet.</span>";
		$errf_7=1;
	}
	if(strlen($f_8)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Ville &raquo; est vide ou incomplet.</span>";
		$errf_8=1;
	}
	if(strlen($f_9)<2){
		$erreur.="<li><span class='txterror'>Le champ &laquo; Téléphone &raquo; est vide ou incomplet.</span>";
		$errf_9=1;
	}
 
	if($erreur==""){
		// Création du message
		$titre="Message de votre site";
		$tete="www.sri-valdoise.com";
		$corps.="Civilité : ".$list['f_1'][$f_1]."\n";
		$corps.="Nom : ".$f_2."\n";
		$corps.="Prénom : ".$f_3."\n";
		$corps.="Email : ".$f_4."\n";
		$corps.="Société : ".$f_5."\n";
		$corps.="Adresse : ".$f_6."\n";
		$corps.="Code postal : ".$f_7."\n";
		$corps.="Ville : ".$f_8."\n";
		$corps.="Téléphone : ".$f_9."\n";
		for($id=0; $id<count($list['f_10']); $id++){
			if($f_10[$id]==1){
				$corps.="Inscription aux Programmes du mercredi 11 mai : ".$list['f_10'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_11']); $id++){
			if($f_11[$id]==1){
				$corps.="Inscription aux Programmes du jeudi 12 mai : ".$list['f_11'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_12']); $id++){
			if($f_12[$id]==1){
				$corps.="Inscription aux Programmes du vendredi 13 mai : ".$list['f_12'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_13']); $id++){
			if($f_13[$id]==1){
				$corps.="Inscription aux Programmes du samedi 14 mai : ".$list['f_13'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_14']); $id++){
			if($f_14[$id]==1){
				$corps.="Inscription aux Programmes du Lundi 16 mai : ".$list['f_14'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_15']); $id++){
			if($f_15[$id]==1){
				$corps.="Inscription aux Programmes du Mardi 17 mai : ".$list['f_15'][$id]."\n";
			}
		}
		for($id=0; $id<count($list['f_16']); $id++){
			if($f_16[$id]==1){
				$corps.="Inscription aux Programmes du Mercredi 18 mai : ".$list['f_16'][$id]."\n";
			}
		}
		if(mail("adresse mail", $titre, stripslashes($corps), $tete)){
			$ok_mail="true";
		}else{
		$erreur.="<li><span class='txterror'>Une erreur est survenue lors de l'envoi du message, veuillez refaire une tentative.</span>";
		}
	}
}
?>

Ci-dessous c'est la suite du code qui se trouve entre les balises BODY :
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
 
<p class="fil_ariane"><a href="index.html" class="liennoir">Accueil</a> &gt; <a href="formulaire_inscription.php" class="liennoir">Formulaire d'inscription </a><a href="programme-samedi-14-mai.html" class="liennoir"></a></p>
      <table width="442" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><? if($ok_mail=="true"){ ?>
	<table width='100%' border='0' cellspacing='1' cellpadding='1'>
		<tr><td><span class='txtform'>Les informations ci-dessous nous ont  &eacute;t&eacute; tansmises, et nous vous en remercions.</span></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td><tt><?echo nl2br(stripslashes($corps));?></tt></td></tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td>&nbsp;</td>
		</tr>
	</table>
<? }else{ ?>
<form action='<? echo $PHP_SELF ?>' method='post' name='Form'>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>
<? if($erreur){ ?><tr><td colspan='2' bgcolor='red'><span class='txterror'><font color='white'><b>&nbsp;ERREUR, votre message n'a pas &eacute;t&eacute; transmis</b></font></span></td></tr><tr><td colspan='2'><ul><?echo$erreur?></ul></td></tr><?}?>
<tr>
  <td colspan='2'><span class='txterror'>Les champs marqu&eacute;s d'un * sont obligatoires</span></td>
</tr>
<tr><td align='right' width='30%'><span class='txterror'>Civilit&eacute; :</span></td>
<td>
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_1']);$id++){
if($id==$f_1){$ct="checked";}
print("<tr><td><input ".$ct." type='radio' name='f_1' value=".$id." border='0'></td><td><span class='txtform'>".$list[f_1][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Nom* :</span></td><td><input type='text' style='width:200 <?if($errf_2==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_2' value='<?echo stripslashes($f_2);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Prénom* :</span></td><td><input type='text' style='width:200 <?if($errf_3==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_3' value='<?echo stripslashes($f_3);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Email* :</span></td><td><input type='text' style='width:200 <?if($errf_4==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_4' value='<?echo stripslashes($f_4);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Société :</span></td><td><input type='text' style='width:200 <?if($errf_5==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_5' value='<?echo stripslashes($f_5);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Adresse* :</span></td><td><input type='text' style='width:200 <?if($errf_6==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_6' value='<?echo stripslashes($f_6);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Code postal* :</span></td><td><input type='text' style='width:200 <?if($errf_7==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_7' value='<?echo stripslashes($f_7);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Ville* :</span></td><td><input type='text' style='width:200 <?if($errf_8==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_8' value='<?echo stripslashes($f_8);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Téléphone* :</span></td><td><input type='text' style='width:200 <?if($errf_9==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_9' value='<?echo stripslashes($f_9);?>' size='24' border='0'></td></tr>
<tr><td align='right' valign="top">&nbsp;</td> <td valign="top">&nbsp;</td></tr><tr>  <td align='right' valign="top"><hr /></td>
  <td valign="top"><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />Inscription aux Programmes du mercredi&nbsp;11&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_10']);$id++){
if($f_10[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_10[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_10][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr>
  <td align='right' valign="top"><hr /></td>
  <td valign="top"><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
    Inscription aux Programmes du jeudi&nbsp;12&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_11']);$id++){
if($f_11[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_11[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_11][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr>
  <td align='right' valign="top"><hr /></td>
  <td valign="top"><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
    Inscription aux Programmes du vendredi&nbsp;13&nbsp;mai :</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_12']);$id++){
if($f_12[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_12[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_12][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr>
  <td align='right' valign="top"><hr /></td>
  <td valign="top"><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
    Inscription aux Programmes du samedi&nbsp;14&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_13']);$id++){
if($f_13[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_13[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_13][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr>
  <td align='right' valign="top"><hr /></td>
  <td valign="top"><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
    Inscription aux Programmes du Lundi&nbsp;16&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_14']);$id++){
if($f_14[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_14[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_14][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td></tr>
<tr>
  <td align='right'><hr /></td>
  <td><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
Inscription aux Programmes du Mardi&nbsp;17&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_15']);$id++){
if($f_15[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_15[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_15][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td>
</tr>
<tr>
  <td align='right'><hr /></td>
  <td><hr /></td>
</tr>
<tr>
  <td align='right' valign="top"><span class='txtinscription'><br />
Inscription aux Programmes du Mercredi&nbsp;18&nbsp;mai&nbsp;:</span></td>
  <td valign="top">
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_16']);$id++){
if($f_16[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' name='f_16[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_16][$id]."</span></td></tr>");
unset($ct);
}?>
</table></td>
</tr>
<tr>
  <td align='right'></td>
  <td>&nbsp;</td>
</tr>
<tr>
<td align='right' width='30%'></td><td><input type='submit' name='submit' value='Envoyer' border='0'></td></tr>
</table>
</form>
<? } ?>&nbsp;</td>
        </tr>
      </table>
      <p class="fil_ariane">&nbsp;</p>