how to check multiple $_POST variable for existence using isset()?

前端 未结 9 856
隐瞒了意图╮
隐瞒了意图╮ 2020-12-18 05:17

I need to check if $_POST variables exist using single statement isset.

if (isset$_POST[\'name\']  &&  isset$_POST[\'number\']  &&am         


        
9条回答
  •  借酒劲吻你
    2020-12-18 05:57

    Do you need the condition to be met if any of them are set or all?

    foreach ($_POST as $var){
        if (isset($var)) {
    
        }
    }
    

提交回复
热议问题