BBGaming Posted May 28, 2007 Share Posted May 28, 2007 I was wondering if there was a way to include a bunch of pages in one. Let me explain: I start with the template of my site, and add pages using include(). In the page I include I want to have links to pages, that load in the same page. It's hard to explain. Page1 include()'s page2. I want page 2 to have links to page3, page4, and page5, but I want them to load in page2 when you click the links, instead of linking to a seperate page. Can you help? Link to comment https://forums.phpfreaks.com/topic/53224-solved-help/ Share on other sites More sharing options...
chriscloyd Posted May 28, 2007 Share Posted May 28, 2007 ya do something along the lines with switch statements like this <?php echo '<a href="index.php?page=test1>Link 1</a> - '; echo '<a href="index.php?page=test2>Link 2</a> - '; echo '<a href="index.php?page=test3>Link 3</a> - '; switch($_GET['page']) { case "test1": include("file1.php"); break; case "test2": include("file2.php"); break; case "test3": include("file3.php"); break; } ?> Link to comment https://forums.phpfreaks.com/topic/53224-solved-help/#findComment-262980 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.