Web Hosting Talk







View Full Version : Php page linking


Spy187
12-23-2004, 06:04 AM
http://www.xeocomm.com/?pg=dedicated?=intel=p4

see how the ? changes with each page name?

what is the easiest way to do this

waht is the best way to do this

tutorials etc would be lovely

portal
12-23-2004, 06:11 AM
<?php
include("include/header.html");
switch($_GET['pg'])
{
///// BEGIN //////

// SECTION 1

case "section1" :
include("main.section.inc.php");
break;

// SUB-SECTION

case "section1?=section2" :
include("secondary.section1.section2.inc.php");
break;
}
?>


Hope that helps. Good luck

Spy187
12-23-2004, 06:20 AM
Thanks very much Mr. Bekman

Spy187
12-23-2004, 06:23 AM
So say I have a page for servers

I'd have servers.php as section 1

then a file called server.intel.php server.amd.php

portal
12-23-2004, 04:08 PM
<?php
include("include/header.html");
switch($_GET['pg'])
{
///// BEGIN //////

// SERVERS

case "servers" :
include("main.servers.inc.php");
break;

// SUB-SERVERS

case "servers?=intel" :
include("secondary.servers.intel.inc.php");
break;
}
?>


That is how it would look like.

baboon1000
12-23-2004, 06:22 PM
ive been wanting to know how to do this for a while too but just couldnt ever find a name for what its called to ask someone how to do it, thanks

portal
12-23-2004, 06:28 PM
Glad I could help.