|
Posted by MS on 05/08/06 15:59
Your basic index.php would be something like the following.
<?php
require_once "header.php";
// Set Default Page ($pageid)
if(!isset($pageid) || !file_exists($pageid.".php")) $pageid= "default";
if(file_exists($pageid.".php")){
include $pageid.".php";
}
require_once "footer.php";
?>
where pageid can be "words" or "numbers"
links are created by ....
echo "<a href='?pageid=".$linkid.">Link</a>";
--
----------------------------------------------------------------------------
http://www.myclubweb.co.uk - The Home of Club Websites
----------------------------------------------------------------------------
"Christina" <designer@centurytel.net> wrote in message
news:2KydnQNgXqP7LMPZRVn-rQ@centurytel.net...
> Thank you Rene...would the if/else go in the content section?
>
> I guess I'm not clear on how to generate the linking text into propogated
> menu either. Can you clarify the use of & for me? Is it there to tell
> the browser that it's an html ampersand? Wouldn't it need to use a
> variable? (id=$pageid). The links table in the database will have the
> pageID, pagename, pagetitle, category, subcategory, etc.
>
> Thanks again,
>
> Chris
>
> "Rene Pot" <renepot@chello.nl> wrote in message
> news:1ab9d$445e83e4$3ec2ab98$8322@news.chello.nl...
> > If each page has his own ID/name, then you can use the get "script":
> >
> > <?
> > if (isset($_GET['id'])) {
> > $id = $_GET['id'];
> > } else {
> > $id = 0;
> > }
> > ?>
> >
> > If you use this code, you need to link to a page like: <a
> > href="?page&id=20">Link</a>
> > If you want the title to change, just use <title><? echo (&id) ?> That
> > makes the title change into the ID
> > The same with link's ;)
>
>
Navigation:
[Reply to this message]
|