Bonjour,
Je suis en train de devenir fou. Je n'arrive pas à afficher mes $_GET ou $_POST. C'est la première fois que cela m'arrive, et je ne vois pas la bétise que je fais :-(
Merci pour l'aide


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
<html>
<head>
<script language="JavaScript">
function refresh() { window.location.reload( false );}
function calculeBoxes(the_form) {
var total     = 0;
var elts      = document.forms[the_form].elements['aCalcule[]'];
var elts_cnt  = (typeof(elts.length) != 'undefined')
       ? elts.length
       : 0;
for (var i = 0; i < elts_cnt; i++) {
if (elts[i].checked) {
total += parseFloat(elts[i].value);
} // end if
} // end for
document.f1.resultat.value=total;
return true;
} // end of the 'calculeBoxes()' function
</script>
</head>
 
<body>
<?
print("<pre>");
print_r($_POST);
print_r($_GET);
print("</pre>");
?>
<script language="JavaScript">
document.write('<b>' + (new Date).toLocaleString() + '</b>');
</script>
<form name="f1" method="GET">
	<input type="hidden" name="essai" value="XXXXXXX">
	<input type="button" value="Refresh Form Button" name="button1" onClick="refresh()">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr><td class="tab" valign="top"><input name="aCalcule[]" value="5000" type="checkbox" onClick="calculeBoxes('f1')" ></td></tr>
		<tr><td class="tab" valign="top"><input name="aCalcule[]" value="1000" type="checkbox" onClick="calculeBoxes('f1')" ></td></tr>
	</table>
	<input name="resultat" type="text">
</form>
</body></html>