title: This code redirects to login page instead of staying in same home page.
body: <p>I want my website to be accessed either by session or cookie. But after writing this code, the page needs both condition to be true instead of one. 
  What's wrong here?</p>
  
  <pre><code>&lt;?php
      if(((isset($_SESSION['SUCCESS']) &amp;&amp; $_SESSION['SUCCESS'] != "") || 
      (isset($_COOKIE['is_logged_in']) &amp;&amp; $_COOKIE['is_logged_in'] != "")) 
       == false){
          $_SESSION['ERROR'] = "Please login first";
          header('location: login.php'); 
      }
  
  ?&gt;
  </code></pre>