Get $_POST from multiple checkboxes

前端 未结 5 1379
醉酒成梦
醉酒成梦 2020-11-22 01:03

I have 1 form in with multiple checkboxes in it (each with the code):



        
5条回答
  •  心在旅途
    2020-11-22 01:24

    It's pretty simple. Pay attention and you'll get it right away! :)

    You will create a html array, which will be then sent to php array. Your html code will look like this:

    
    
    
    

    Where [1] [2] [3] are the IDs of your messages, meaning that you will echo your $row['Report ID'] in their place.

    Then, when you submit the form, your PHP array will look like this:

    print_r($check_list)

    [1] => checked [3] => checked

    Depending on which were checked and which were not.

    I'm sure you can continue from this point forward.

提交回复
热议问题