How to read if a checkbox is checked in PHP?

后端 未结 18 962
刺人心
刺人心 2020-11-22 07:54

How to read if a checkbox is checked in PHP?

18条回答
  •  渐次进展
    2020-11-22 08:46

    If your HTML page looks like this:

    
    

    After submitting the form you can check it with:

    isset($_POST['test'])
    

    or

    if ($_POST['test'] == 'value1') ...
    

提交回复
热议问题