By Jason Slater
Friday, 18 April 2008
Friday, 18 April 2008
Sample code to handle page inclusion based on get values
// parse the passed value
switch($_GET['page'])
{
// check for page1
case('page1'):
include 'page1.php';
break;
// check for page2
case('page2'):
include 'page2.php';
break;
// send other enquiries to our 404 page
default:
include 'page404.php';
break;
}
Related
- PHP: Encoding HTML Special Characters
- PHP: Web Service Feed Information
- Embedding Flash into a web page?
- Code Comments
- PHP: Add a number of days to a date


