I want to know if a code like this in valid in PHP .. what i am trying to do is use OR (||) and OR (&&) in an if statement in PHP here is my code.
if ( (isset($_POST['submit_name']) && !empty($_POST['name'])) || (isset($_POST['submit_chat']) && !empty(trim($_POST["message"])) || !empty($_FILES['upload'])) ) {
// code here...
} else {
//else code here...
}
Aucun commentaire:
Enregistrer un commentaire