How to submit checkbox values with PHP post method

后端 未结 7 561
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 12:48






        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 13:22

    Change the markup to something like

    
    
    
    

    and to get the values submitted, use a simple loop

    foreach($_POST['checkbox'] as $checkbox){
        echo $checkbox . ' ';
    }
    

提交回复
热议问题