razorsese Posted April 7, 2012 Share Posted April 7, 2012 I have a problem whit a php code Every time I click a link the page url is continuing to accumulate like here: ?action=viewArticle&articleid=7&page=1&page=1&page=1&page=3&page=3&page=2&page=3 the "&page=" is continuing to add but I want to display a single &page How I can do that?! echo "<a href= ' ".$_SERVER['REQUEST_URI']."&page=$v ' >$v</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/260513-php-and-url/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 7, 2012 Share Posted April 7, 2012 When you build links, for something like pagination, you need to only set the page=x portion of the get parameters. See the following post for how you can do this - http://www.phpfreaks.com/forums/index.php?topic=348834.msg1646676#msg1646676 Quote Link to comment https://forums.phpfreaks.com/topic/260513-php-and-url/#findComment-1335207 Share on other sites More sharing options...
razorsese Posted April 7, 2012 Author Share Posted April 7, 2012 Thanks for the fast respone !!!! ))) Problem solved Quote Link to comment https://forums.phpfreaks.com/topic/260513-php-and-url/#findComment-1335209 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.