Jump to content

Archived

This topic is now archived and is closed to further replies.

ltoto

Linking to Specific Id's

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
this is how it is in the sql

tabPages:

id
pagesTitle
pagesName
pagesContent
pagesDate

then 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,

Share this post


Link to post
Share on other sites
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 has

index.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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.