Multiple links to same page problem

magictree

New Member
I've a list of 50+ links, each to their own specific page with the same template. I figured that it'd be wiser to make one page and modify it according to which link sends the user to that page (e.g. clicking 'real estate' would display the page with only real estate elements). So, basically $_GET business.

Now it might be the fact that I haven't PHP'd in a while, but I can't seem to figure how to do this.
 

ram4nd

New Member
To links goes url like:
<a href="http://www.browse-tutorials.net?link=1">Link</a>

you can get variables after ? with GET
$id = $_get['link'];

And then put content or what ever you want to load it with case or if else

if($id == 1) echo 'first link';
if($id == 2) echo 'second link';
...
 
Top