mardi 18 février 2020

Checking if at least one field is not empty [duplicate]

i have the following code, and need help with one logic. I would like for at least one field to not be empty.

if(!empty($one) || !empty($two) || !empty($three)) {
    $error = "Please select atleast one product";
}
else {
//Some Logic Here
}

Aucun commentaire:

Enregistrer un commentaire