title: php Header: location will not go without a break but break causes error?
body: <p>I have a page that if it's linked to directly redirects to the home page</p>
  
  <pre><code>if(!isset($_SERVER['HTTP_REFERER'])){
      header("Location: http://www.MYWEBSITE.com");
      break;
  }
  </code></pre>
  
  <p>without the break I get a white page as it continues to run but with the break causes <code>PHP Fatal error:  Cannot break/continue 1 level</code>. I get that making it an <code>if }else { statement</code> resolves it - I just think it's messy but I would like to know why the first header statement isn't acted up on at the time and if there's a better way of doing it.</p>