title: "Undefined index" error when accessing GET variable
body: <p>I'm using PHP 5.4.6 with MySQL 5.5.27 and Apache 2.4.2.</p>
  
  <p>My problem is that I'm trying to fetch the value of a URL passed variable using <code>$_GET</code> but an error always comes up stating: Undefined index: err in thispage.php at this line.</p>
  
  <p>I looked around and realized that most of the developers solved that by using the <code>isset()</code> function. But this doesn't solve my problem because I need to get the actual value of the variable sent in the URL!</p>
  
  <p>The URL is <code>http://localhost/Edugate/index.php?err=1</code>.</p>
  
  <p>This is my code in the <code>index.php</code> page:</p>
  
  <pre><code>&lt;?php
  $error = $_GET['err'];
  
  if($error == 1)
      print "&lt;img src='icons/error.png' alt='error'&gt; Icorrect usename or password...";
  ?&gt;
  </code></pre>