# Help with AND OR == and !=

**URL:** <https://forum.kirupa.com/t/help-with-and-or-and/271035>\
**Category:** Uncategorized\
**Created:** [September 17, 2008, 5:20pm UTC](https://forum.kirupa.com/t/help-with-and-or-and/271035 "2008-09-17T17:20:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alapimba](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@alapimba](https://forum.kirupa.com/u/alapimba)\
**Post date:** [September 17, 2008, 5:20pm UTC](https://forum.kirupa.com/t/help-with-and-or-and/271035/1 "2008-09-17T17:20:51Z")

</div>

Hi  
i have this code:

```php
} elseif
($_POST["entidade1"] != "" && $_POST["morada1"] == "" || $_POST["codigo1"] == "" || $_POST["localidade1"] == "" || $_POST["telefone1"] == "" || $_POST["fax1"] == "" || $_POST["contribuinte1"] == "") {
echo "Por favor preencha os campos de facturação em branco<br>
<a href=\"Form1.html\">voltar</a>";

```

This is from a form, it’s supposed to check if the text field “entidade1” is filled. if it’s filled it’s required all other fields to be filled to.

by the way… i guess it’s better check if any field on this area is filled all other to be also filled.

Anyone to help me?

Thanks
