I have a html form in php page and the form is processed in same php after submit:

```
page:1: form.php
<form action="" method="post">
 <input type="hidden" name="id" value="25" />
 <input type="hidden" name="typid" value="250" />
 Name: <input type="text" name="name" value="Mr.X" /><br />
 Address: <input type="text" name="address" value="USA" /><br />
 Mobile: <input type="text" name="mobile" value="1234567890" /><br />
 <input type="submit" name="submit" value="Submit" />
</form>

<?php
if(isset($_POST['submit']){
  foreach($_POST as $key=>$value){
    if($key!='id' || $key!='typid'){
      echo $key.' : '.$value.'<br />';
    }
  }
}
?>

```

according to the condition inside foreach loop, the output should be like this:

```
 name : Mr.X
 address : USA
 mobile: 1234567890

```

but it is giving output like this:

```
 id : 25
 tpid : 250
 name : Mr.X
 address : USA
 mobile: 1234567890

```

If I remove one condition from 'if' condition inside foreach loop like this:

```
if(isset($_POST['submit']){
  foreach($_POST as $key=>$value){
    if($key!='id'){
      echo $key.' : '.$value.'<br />';
    }
  }
}

```

the output is as expected:

```
 tpid : 250
 name : Mr.X
 address : USA
 mobile: 1234567890

```

why the OR (||) operator is not working in this case?