2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by PixelatedKarma
2

Use switch():

<?php

	$a = 'about'; # replace with $_GET['page']
	switch($a)
	{
		case 'about':
			echo 'about page'; #instead of echo you can include
		break;
		case 'contacts':
			echo 'contact page';
		break;
		default:
			echo 'home page';
		break;
	}

?>

name the page index.php and make these links:

http://your.website/index.php?page=about
http://your.website/index.php?page=contact

If you write something else is not a case switch, then the script will echo the default value. If then you want links like this: http://your.website/about then you need to edit the .htaccess file, search for mod_rewrite to get more information.

Edited by cereal: n/a

Votes + Comments
Well written
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.