How to read if a checkbox is checked in PHP?

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

How to read if a checkbox is checked in PHP?

18条回答
  •  盖世英雄少女心
    2020-11-22 08:29

    Learn about isset which is a built in "function" that can be used in if statements to tell if a variable has been used or set

    Example:

        if(isset($_POST["testvariabel"]))
         {
           echo "testvariabel has been set!";
         }
    

提交回复
热议问题