Passing checkbox state to PHP

前端 未结 6 1671
南笙
南笙 2021-01-24 22:54


This works fine, ho

6条回答
  •  心在旅途
    2021-01-24 23:46

    The better approach is to remove the hidden field, and simply have a check in PHP:

    if ($_POST['check_box_1']=='1') { /*Do something for ticked*/ }
    else { /*Do something for unticked*/ }
    

提交回复
热议问题