$_POST Array from html form

前端 未结 4 723
悲&欢浪女
悲&欢浪女 2020-11-28 12:46

I am trying to send data from multiple checkboxes (id[]) and create an array \"info\" in php to allow me to run a script for each value (however the quantity of values may c

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 13:13

    You should get the array like in $_POST['id']. So you should be able to do this:

    foreach ($_POST['id'] as $key => $value) {
        echo $value . "
    "; }

    Input names should be same:

    
    
    ...
    

提交回复
热议问题