title: Using GET parameter to get a passed variable
body: <pre><code>while($row=mysqli_fetch_assoc($result))
      { 
          echo "`&lt;tr&gt;`&lt;tr&gt;";
          echo "&lt;td&gt;&lt;a href="viewproject.php?q=$row['pid']"&gt;"$row['pname']"&lt;/a&gt;&lt;/td&gt;";
  
      }
  </code></pre>
  
  <p>I tried echoing <code>$row['pid']</code> in <code>viewproject.php</code> page using <code>$_GET['q']</code>.</p>
  
  <p>However the above code generates the following error:</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected 'viewproject' (T_STRING), expecting ',' or ';'</p>
  </blockquote>