title: PHP passing a variable with header redirect
body: <p>I am trying to pass a variable within a header link. I have tried below code</p>
  
  <pre><code>$name = "mike";
  
  if($name != "lopan"){
          header("Location:error-page.php?$errorMssg=Please enter information?");
  }
  </code></pre>
  
  <p>This page redirect to location  but doesn't pass the variable that contains the message. But when i create a simple link with values like this:</p>
  
  <pre><code>&lt;a href="error-page.php?$errorMssg=so what happened there buddy?"&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>it passes it just fine.</p>
  
  <p>Any ideas what i am doing wrong? or  i can  not pass information with headers?</p>