if !isset multiple OR conditions

前端 未结 8 1270
一整个雨季
一整个雨季 2021-01-04 06:51

I cannot get this to work for the life of me, it is PHP.



        
8条回答
  •  情歌与酒
    2021-01-04 07:33

    When you work with POST, use empty(). because when your form send data. It async null for empty input! best way is that:

     if ((!isset($_POST['ign']) || empty($_POST['ign'])) &&
         (!isset($_POST['email']) || empty($_POST['email'])) {
    

    YES! It's Ugly...

    So you can use:

    
    

提交回复
热议问题