Salva come pagina0.php
nella funzione che ti avevo postato c'era uninvece di,...;
Codice PHP:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
function controllo(f)
{
var ckIndex = -1;
var parametro = "";
for (var i=0; i<3; i++)
{
var b = document.getElementById("ck"+i).checked;
if (b)
{
ckIndex = i;
parametro += i + " ";
}
}
if (ckIndex>=0)
{
f.action="pagina0.php?value="+parametro;
}
else
{
f.action="pagina0.php?value=null";
}
alert ("action: "+f.action);
f.submit();
}
</script>
</head>
<body>
<?php
echo "Valore letto: $_GET[value]";
?>
<div align="center">
<form name="form1" action="" method="post" onsubmit="return controllo(this)">
<table width="200" border="1">
<tr>
<td><input type="checkbox" name="gruppo" id="ck0"></td>
<td><input type="checkbox" name="gruppo" id="ck1"></td>
<td><input type="checkbox" name="gruppo" id="ck2"></td>
</tr>
<tr>
<td colspan="4">
<input type="submit" value="Invia">
</td>
</tr>
</table>
</form>
</div>
</body>
</html>

Rispondi quotando