title: PHP get record in page from URL
body: <p>I have database name is "db" Table is 'tbl_pro' is Feild are "msid" "subid" "pid" and "pname".</p>
  
  <p>when I try to fetch the data through "msid" from URL it is working fine on a new page. but through "pname" I am not able to get it.   here is my code</p>
  
  <p>Page 1 code:</p>
  
  <pre><code>&lt;?
              $QryP=mysql_query("Select * from tbl_pro where Pname='test' order by Rank desc") or die("Error loading Products");
              if(mysql_num_rows($QryP)&gt;0) {
              while($rs=mysql_fetch_array($QryP)){
                    ?&gt;  
                  &lt;div class="col-md-3 col-sm-4 "&gt;
                      &lt;div class="w-box product"&gt;
                          &lt;figure&gt;
                              &lt;img alt="" src="upload/spic/&lt;?=$rs["Spic"]?&gt;" class="img-responsive img-center"&gt;
                          &lt;/figure&gt;
                          &lt;h2&gt;&lt;a href="test.php?Pname=&lt;?=$rs["Pname"]?&gt;"&gt;&lt;?=$rs["Pname"]?&gt;&lt;/a&gt;&lt;/h2&gt;
                                      &lt;p&gt;
  </code></pre>
  
  <p>on the other page its.</p>
  
  <p>Page 2 code:</p>
  
  <pre><code> &lt;?
          $QryP=mysql_query("Select * from tbl_pro where Pname=".$_REQUEST["Pname"]."    AND  Display='y'" ) or die("Error loading Products");
              if(mysql_num_rows($QryP)&gt;0) {
              while($rs=mysql_fetch_array($QryP)){
  
      ?&gt; 
  </code></pre>
  
  <p>if i use "msid" instead of "Pname" its working fine. </p>