detect unchecked checkbox php

前端 未结 4 1170
无人共我
无人共我 2020-12-11 09:38

Is there a way to check of a checkbox is unchecked with php? I know you can do a hidden field type in html but what about with just php when the form is submitted? I tried b

4条回答
  •  情深已故
    2020-12-11 10:36

    $checkedfeild = @$_POST["yourfeildname"];
    
    if(isset($checkedfeild))
    {
     //Code here
    }
    else
    {
    echo"Not checked";
    }
    

提交回复
热议问题