I am unable to get the ID in the url string
<p>I am passing the ID in onclick function,but when I get the id in the page ,it says "undefined index ID".</p>

<p>Here is the php code which passes the ID to the url</p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;
        &lt;a href="#" class="ok"&gt;
            &lt;img style='width: 200px' src="images/&lt;?php echo $pics; ?&gt;" alt="name" onclick="location.href='#img?ID=&lt;?php echo $imgid ?&gt;' ;img('&lt;?php echo $pics ?&gt;','&lt;?php echo $imgid ?&gt;')"  &gt; 
        &lt;/a&gt;
    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Here is onclick results in url</p>

<pre><code>http://localhost/2/2/mvc/view/main.php#img?ID=50
</code></pre>

<p>Here is how I am calling the URL ID</p>

<pre><code>&lt;?php  $gid=$_GET['ID']; echo $gid;  ?&gt;
</code></pre>

<p>and here is the error shown</p>

<blockquote>
  <p>Notice: Undefined index: ID in C:\xampp\htdocs\2\2\mvc\view\main.php on line 126</p>
</blockquote>
