<form name="form1" action="test.php" method="post"> <p> <input type="checkbox" name="tf[]" value="1"> <input type="checkbox" name="tf[]" value="2"> <input type="checkbox" name="tf[]" value="3"> <input type="checkbox" name="tf[]" value="4"> <input type="checkbox" name="tf[]" value="5"> </p> </form> //test.php $i = count($tf); for($n=0;$n < $i;$n++) { //$tf[$n]就是选中的值。 }