How get value for unchecked checkbox in checkbox elements when form posted?

前端 未结 11 2425
独厮守ぢ
独厮守ぢ 2020-11-27 17:13

I have a form like below :

11条回答
  •  北海茫月
    2020-11-27 17:26

    Why have you taken it in an array? You can get the unchecked box as 0 by using "isset"

        if(!isset($_POST['status_2'])
        {
          //Set status_2 parameter as 0
        }
    

提交回复
热议问题