URL is getting append while clicking an hyperlink php
<p>I am writing a small webpage in php . while clicking an hyperlink the hyperlink is getting appended</p>

<pre><code>function get_url($ff) {
  $q = isset($_REQUEST['query']) ? $_REQUEST['query'] : NULL;
  return "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] .'?query=' .$q. '&amp;bw' . '=' . $ff ;
} 

 &lt;li&gt;&lt;a href="&lt;?php print get_url('exampl');?&gt;"&gt;example&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>This outputs url like</p>

<pre><code>http://example.com/test/?query=search&amp;bw=test.
</code></pre>

<p>while clicking next time i get</p>

<pre><code>http://example.com/test/?query=search&amp;bw=test?query=search&amp;bw=test.
</code></pre>
