tags:

views:

101

answers:

1

for example,in file test.php:

<a href="someting/?start=1">go</a>;

so that no matter where this test.php is,

can be in Document_Root/Test/ directory,

or can be in Document_Root/Production/ directory,

the anchor will point to itself.

+5  A: 

To write a link that will only change the query string, just use

<a href="?foo=bar">whatever</a>

So if you're at http://the/current/url.php, it goes to http://the/current/url.php?foo=bar, or if you're http://somewhere/else?entire=ly, it goes to http://somewhere/else?foo=bar.

Paul Fisher
thanks,that's definitely what I want.
Shore
If it is, accept his answer by clicking on the check to the left
Paolo Bergantino