处理复选框的步骤如下:
<input type="checkbox" name="hobbies[]" value="reading"> Reading
<input type="checkbox" name="hobbies[]" value="traveling"> Traveling
<input type="checkbox" name="hobbies[]" value="cooking"> Cooking
if(isset($_POST['submit'])){
if(!empty($_POST['hobbies'])){
foreach($_POST['hobbies'] as $hobby){
echo $hobby . "<br>";
}
}
}