title: multiple and or logic in php if statement not working
body: <p>I have gone round and round with this and I can't seem to get the logic correct for what I want. </p>
  
  <p>Here is the code: </p>
  
  <pre><code>   function fetchFile() {
      global $directory;
      if (isset($_GET['id'])) {
          global $sampleIssue,$freeIssue;
          $id = mysql_real_escape_string($_GET['id']);
          $result = mysql_query("SELECT `volume`,`number`,`EditorMessage` FROM `articles` WHERE `id`='$id';");
          $article = mysql_fetch_assoc($result);
  if 
          (($article['volume']!=$sampleIssue['vol'] || $article['number']!=$sampleIssue['no']) || ($article['EditorMessage']==='N')
           &amp;&amp; ($article['volume']!=$freeIssue['vol'] || $article['number']!=$freeIssue['no'])){
      global $needsLogin;
              $needsLogin = TRUE;
          }
  </code></pre>
  
  <p>Basically I need for the login to be true or if any of the three conditions are met:</p>
  
  <pre><code>$article['volume']!=$sampleIssue['vol'] || $article['number']!=$sampleIssue['no']
  OR
  $article['EditorMessage']==='N'
  OR
  $article['volume']!=$freeIssue['vol'] || $article['number']!=$freeIssue['no']
  </code></pre>
  
  <p>I have tried switch cases too and I am just not getting it. </p>