私はphpで小さなウェブページを書いています。ハイパーリンクをクリックしている間、ハイパーリンクが追加されます
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>
これは次のようなURLを出力します
http://example.com/test/?query=search&bw=test.
次回クリックしながら取得
http://example.com/test/?query=search&bw=test?query=search&bw=test.