Yeodan Posted March 25, 2009 Share Posted March 25, 2009 This is an example, the real situation is slightly more complicated. I have a page with some links on it. It's only a few at the moment, but it will grow to 50+ later. index.php <?php echo "<a href='page1.php'>page1</a>"; echo "<a href='page2.php'>page2</a>"; ?> page1.php <?php echo "page1"; ?> page2.php <?php echo "page2"; ?> I was wondering wether it's possible to code 1 page to see wich link was clicked and changes the message according to that. This method works too, but it might get a bit annoying if something has to be changed on the page (every page) and I have 50+ Link to comment https://forums.phpfreaks.com/topic/151129-another-dumb-question/ Share on other sites More sharing options...
Maq Posted March 25, 2009 Share Posted March 25, 2009 Why do you have 50+ there are techniques to slim down your number of pages. For example you could add a variable on the end of your url: echo "page1"; echo "page2"; ?> other_page.php echo $_GET['page']; ?> Hope that help, but you would have to explain your situation a little better for us to come up with a solid solution. Link to comment https://forums.phpfreaks.com/topic/151129-another-dumb-question/#findComment-793920 Share on other sites More sharing options...
Yeodan Posted March 25, 2009 Author Share Posted March 25, 2009 I think this might work. Link to comment https://forums.phpfreaks.com/topic/151129-another-dumb-question/#findComment-793924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.