Ok the plan is to write a script which displays the correct link (which is extracted from a database) when you click on a certain button.
The thing is, i'm using a switch but i'm going to end up extracting the data from my database. I don't want to write a query for every single case in the switch statement as that's a long and horrible process. Surely if i define a function where instead of saying "WHERE title news" i'd replace it with something like "WHERE <? $variable = case ?> title $variable"
Argh, it's hard to explain, i just don't want to write out a query for every single case so i want to use a function which would make it a lot shorter. Basically taking the name of the case and putting it into the query so it'd only display a certain page.
If anyone understands what i mean feel free to point me in the right direction