Argh - Appending to $_GET query across the board

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
LonelyProgrammer
Forum Contributor
Posts: 108
Joined: Sun Oct 12, 2003 7:10 am

Argh - Appending to $_GET query across the board

Post by LonelyProgrammer »

Hi,

The gist of my problem is. I have been writing code that uses the a variable in the GET query to determine which action to take, eg:

Code: Select all

switch ($_GETї"action"];
At the last moment, the client wanted me to add in something new (don't they always?) Basicially, it means appending another variable to the $_GET query. So instead of "main.php?action=something", now I have to to do "main.php?action=something&setting=somethingelse".

The question is - I have dozen of links scattered over five files that need to have the extra variable tagged in. Is there a fast way of doing it across the board? Setting the $_GET query beforehand? Or do I have add in the extra valuable manually? (Man, then I'll be a victim of my own signature line).

Many thanks in advance!
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

yeah, insert it into a database and just query it. lol, other than that, sorry man, but that's the hell of development.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

could stash it in a session, if the value of the "setting" changes..
Post Reply