if !isset multiple OR conditions

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

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



        
8条回答
  •  旧时难觅i
    2021-01-04 07:15

    Simplest way I know of:

    
    

    Edit: Corrected the code to show the form data and empty values errors seperatly.

    Explanation: The first if statement checks that the submitted form contained two fields, ign and email. This is done to stop the second if statement , in the case that ign or email weren't passed in at all, from throwing an error(message would be printed to server logs). The second if statement checks the values of ign and email to see if they contain data.

提交回复
热议问题