View Single Post
Old 09-18-2005, 02:10 AM   #2 (permalink)
Tekime
The Wanderer
 
Tekime's Avatar
 
Join Date: Jul 2005
Posts: 11
Thanks: 0
Tekime is on a distinguished road
Default

I'm not completely sure I know what you mean by page address. But for example, if you have:

www.example.com/index.php?page=x

and

www.example.com/index.php?page=xy

Then you can create a conditional statement like:

if((!empty($_REQUEST['page'])) && ($_REQUEST['page'] == 'x'))
{
// Show page x
}
elseif((!empty($_REQUEST['page'])) && ($_REQUEST['page'] == 'x'))
{
// Show page xy
}

But more likely, you'll want to accept multiple values for 'page' and pull them from a database or file.

Then you'd want to simply check for page, validate page with whatever parameters you require, then load page from DB or disk, and display.

if(!empty($_REQUEST['page']))
{
// Do whatever with $_REQUEST['page']
}
else
{
// Default behavior
}
__________________
Only the sane are truly insane.
LinuxHostingTalk | Hardware and Game Reviews | PHP Maine
Tekime is offline  
Reply With Quote