HuggieBear Posted September 15, 2006 Share Posted September 15, 2006 I didn't see that... It doesn't make sense now. In one post you said this:[quote]Also a quick question, what include would i put on the index page for the hotels page, i would use this normally because i put most things in one page[/quote]Now you're saying:[quote]there is still a problem, which is, thi results now appear on the index page, or the home page when you click on the link, instead of it being on its own page[/quote]Tell me what you want on each page and we'll work out how you need to do it.Huggie Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92308 Share on other sites More sharing options...
ltoto Posted September 15, 2006 Author Share Posted September 15, 2006 ok, so i want the hotels to appear, like , on its own blank page so there is no other content, but it to still be an include, obviously so the design is around it, because at the moment, you click on the region, and the list of hotels within it would appear on the page people see when they first come on the site Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92311 Share on other sites More sharing options...
HuggieBear Posted September 15, 2006 Share Posted September 15, 2006 Do you have individual navigation/design elements on seperate pages that you include?e.g Index.php includes header.php, navigation.php, sidebar.php etc.If so, then create a new page called hotellist.php with ecah of those elements on it and still include pages.php for the content.Huggie Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92318 Share on other sites More sharing options...
ltoto Posted September 15, 2006 Author Share Posted September 15, 2006 i have a page (page.php) for where all the content of the site is displayed, and a page called left.php, which has the menu on it, and if you remember the site it, that page also has the latest deals list on it.... Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92332 Share on other sites More sharing options...
HuggieBear Posted September 15, 2006 Share Posted September 15, 2006 OK, I remember, I'm guessing you only have one page at the moment though? If you had more than one page you'd have come up against this sooner.The problem you have is that you want the content for every page on pages.php and then just to include that in the rest of the pages across the site. If that's the case then you need lots of conditional IF statements on pages.php like I mentioned earlier.Create hotels.php and include pages.php on it. Then change the links in index.php[b]From:[/b][code=php:0]<a href="{$_SERVER['PHP_SELF']}?id={$row['Id']}">{$row['regionName']}</a><br>[/code][b]To:[/b][code=php:0]<a href="pages/hotels.php?id={$row['Id']}">{$row['regionName']}</a><br>[/code]This should still work with the index.php and pages.php that I provided in the earlier post.Huggie Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92338 Share on other sites More sharing options...
ltoto Posted September 15, 2006 Author Share Posted September 15, 2006 i have other pages with content on now, i have pages table in the database, so maybe i could add a page in that called hotels list, or would this not work Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92340 Share on other sites More sharing options...
HuggieBear Posted September 15, 2006 Share Posted September 15, 2006 Oh right, what does the pages table contain then?Huggie Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92343 Share on other sites More sharing options...
ltoto Posted September 15, 2006 Author Share Posted September 15, 2006 this is how it is in the sqltabPages:idpagesTitlepagesNamepagesContentpagesDatethen on the menu in the front end i have the names of the pages listed, for the menu but not in a repeat region because ihave used different icons for each menu image, Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92348 Share on other sites More sharing options...
ltoto Posted September 15, 2006 Author Share Posted September 15, 2006 i was thinking that if i added a new page, then all we would need to do is change the include so that in it it hasindex.php?Id=16 (this would be the hotelistpage)so i thought i could some hwo add that to this<?if (isset($_GET['id'])){ $id = $_GET['id']; include('pages/hotels.php');}?>and also have to change this link here aswell"{$_SERVER['PHP_SELF']}?id={$row['Id']}">{$row['regionName']}any suggestions anyone ? or do i need to go into more detail Quote Link to comment https://forums.phpfreaks.com/topic/20739-linking-to-specific-ids/page/2/#findComment-92403 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.