Forum Moderators: coopster

Message Too Old, No Replies

PHP dynamic links/menu system

         

firefly2442

10:37 pm on Feb 9, 2003 (gmt 0)

10+ Year Member



Hi, I'm trying to change my site from using cgi and "?pageone" links to php files so that they will be indexed. Can someone give me a quick example or website tutorial for this? I'd like to have one "view.php" file that has all my links and copyright and menu and so on that is constant for all pages and have it use include() (I think that's right), to get the page that the user has selected. Thanks.

jatar_k

10:57 pm on Feb 9, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



so you have
view.php?pageone

try
view.php?page=one

then in the file it will include the menu depending on
$_GET['page']

I guess you could look at get
[php.net...]

firefly2442

11:02 pm on Feb 9, 2003 (gmt 0)

10+ Year Member



Thank you very much that's perfect. So view.php?page=one should be able to be indexed by search engines? :)
Thanks.

jatar_k

11:09 pm on Feb 9, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it is always best to stay away from them if you can but google will spider them as long as there is no session id in there. In my experience, I haven't had trouble with a single var.

If you want to use one single menu file that shows the menu for the section there are a few ways to do it.

One I use is reading the url to see where I am in the directory structure and having a different directory for each subsection. I then display the menu attributed to that subsection.

Thus no query strings.