I am writing a small webpage in php . while clicking an hyperlink the hyperlink is getting appended
function get_url($ff) {
$q = isset($_REQUEST['query']) ? $_REQUEST['query'] : NULL;
return "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] .'?query=' .$q. '&bw' . '=' . $ff ;
}
<li><a href="<?php print get_url('exampl');?>">example</a></li>
This outputs url like
http://example.com/test/?query=search&bw=test.
while clicking next time i get
http://example.com/test/?query=search&bw=test?query=search&bw=test.
change this
to