preserving GET in links!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benbur
Forum Newbie
Posts: 1
Joined: Tue Feb 19, 2008 7:23 pm

preserving GET in links!

Post by benbur »

This has been bugging me for ages... how would it be possible to include all set $_GET variables in hrefs from a page?

Example:
The user visits something.php?sort=a&page=3
They want to go to page four, ay? The link should be something.php?sort=a&page=4 ok that's easy enough, right?
but with a lot of GET variables that may or may not be set it can get pretty annoying... ten logic functions just to get a URL right...

Is there some way to say... handle all of that easily?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: preserving GET in links!

Post by Christopher »

(#10850)
Post Reply