quite long script...
<?
$width = 10;
$height = 10;
if(!isset($go)) {
echo "<form name='foo' action='$PHP_SELF' method='post'><table>";
for($a=0;$a<$height;$a++) {
echo "<tr>";
for($b=0;$b<$width;$b++) {
$cbNro = $a."_".$b;
echo "<td><input type='checkbox' name='chb$cbNro'></td>";
}
echo "</tr>";
}
echo "</table><input type='button' onclick='javascript:this.form.submit();' value='next'><input type='hidden' name='go' value='1'></form>";
} else {
if($go==1) {
// remove var[go]
array_pop($_POST);
print_r(array_keys($_POST));
echo "<form name='foo' action='$PHP_SELF' method='post'><table>";
for($a=0;$a<$height;$a++) {
echo "<tr>";
for($b=0;$b<$width;$b++) {
$cbNro = $a."_".$b;
if(array_key_exists("chb".$cbNro,$_POST)) {
$sel = "CHECKED";
} else {
$sel = "";
}
echo "<td><input type='checkbox' $sel name='chb$cbNro'></td>";
}
echo "</tr>";
}
echo "</table>";
echo "START <select name='strt'>";
for($a=0;$a<$height;$a++) {
for($b=0;$b<$width;$b++) {
$curVal = $a.",".$b;
echo "<option value='$curVal'>$curVal</option>";
}
}
echo "</select><br>";
echo "START <select name='ed'>";
for($a=0;$a<$height;$a++) {
for($b=0;$b<$width;$b++) {
$curVal = $a.",".$b;
echo "<option value='$curVal'>$curVal</option>";
}
}
echo "</select><br>";
print "<input type='button' onclick='javascript:this.form.submit();' value='next'><input type='hidden' name='go' value='1'></form>";
} elseif($go==2) {
// make here table again
// remember to rip last 3 var for($a=0;$a<3;$a++) { array_pop($_POST);}
}
}
?>