View Single Post
Old 05-20-2006, 10:33 AM   #3 (permalink)
BlazingWolf
 
Super Techie

Join Date: Apr 2004

Posts: 316

BlazingWolf

Default

Quote:
However you wont be able to do this if register_globals is disabled (it is now disabled by default with php). register globals is what enables the passing of variables in the URL.
Thats wrong. You can still use this kind of naviagation with no problem. But you can't access the varible with $pageid you have to use $_GET['pageid']

The most common way this is done, is to with a switch statement.

PHP Code:
switch($_GET['pageid']
{
case 
"top10":
include(
"top10.php");
break;
case 
"chat":
include(
"chat.php");
break;
default:
include(
"main.php")
break;


And then you would form a link like this

Top 10 of E3

If you really wanted to use numbers for the page idea you would add an array into the middle like the prevouis poster did with the same swith structure but instead using

include(pagesarray[$_GET['pageid']);
__________________
BlazingWolf
<font color=\'red\'>
<b>
<a href=\'http://www.gaming-forums.org\'>
Gaming-Forums.org
<a/>
</b>
</font>
BlazingWolf is offline