View Single Post
  #1   Spotlight this post!  
Unread 09-01-2005, 00:19
plutonium83
 
Posts: n/a
Dynamic Linking with PHP

Dynamic linking and page generation is a very useful tool for your website. It makes every site follow a specific template for site consistency so its easy to change designs. Here is an example of one done in PHP.

<?php
switch ($page) {
case "news":
include('news.html');
break;
case "about":
include('about.html');
break;
case "contact":
include('contact.html');
break;
default:
include('start.html');
}
?>

An example link to the "news" page would be http://domain.com/index.php?page=news. Going to this site would add news.html to the rest of the html.

Knowing this, you can go crazy and make some page specific commands!

Note: Google does not like pages that use this script. However, you can use the apache mod_rewrite module to change the url to be more cache friendly. I'm not quite sure how to do this.

For for information visit: http://www.dotdragnet.com/content.php?aid=18

Enjoy!

Last edited by plutonium83 : 09-01-2005 at 09:41.