title: Header location not working properly
body: <p>My URL is <a href="http://www.website.ro/index.php?subiect=10046&amp;pag=1" rel="nofollow">http://www.website.ro/index.php?subiect=10046&amp;pag=1</a><strong>#1006</strong>, and i have a form here with no action (<code>&lt;form action="" method="post"&gt;</code>).</p>
  
  <p>After submit I'm checking some input fields and if there is any error, I want to redirect. I use this code:</p>
  
  <pre><code>header('Location: /index.php?subiect='.$_GET['subiect'].'&amp;pag='.$_GET['pag']); exit();
  </code></pre>
  
  <p>But the redirect includes <strong>#1006</strong> so my page becomes <a href="http://www.website.ro/index.php?subiect=10046&amp;pag=1" rel="nofollow">http://www.website.ro/index.php?subiect=10046&amp;pag=1</a><strong>#1006</strong></p>
  
  <p>I tried to change location in the header with: </p>
  
  <pre><code>header('Location: http://www.google.com'); exit();
  </code></pre>
  
  <p>The page where takes me is : <a href="http://www.google.com" rel="nofollow">http://www.google.com</a><strong>#1006</strong></p>
  
  <p>Why does it do this?</p>
  
  <p>I have <code>ob_start()</code> at first line and i tried to deleted it. No effect. The url after redirect stil has <strong>#1006</strong>. </p>
  
  <p>If my url is <a href="http://www.website.ro/index.php?subiect=10046&amp;pag=1" rel="nofollow">http://www.website.ro/index.php?subiect=10046&amp;pag=1</a> and i use header location i don't have problems, but if the url contains #1006 the url after redirect contains to.</p>