Adamw2006 Posted August 27, 2006 Share Posted August 27, 2006 Hello all, i am new to php and i was just wondering how i create page ids. For example i am wanting to know how to make the 'index.php?id=home' 'index.php?id=contact' sorta pages/sections?I just can't find anywhere that tells me how to do this. I know it's probably VERY easy, but like i said i am new to this.Thanks!Adam. Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 27, 2006 Share Posted August 27, 2006 http://www.php.net/switchis your best bet and safest way :)Liam Quote Link to comment Share on other sites More sharing options...
AdRock Posted August 27, 2006 Share Posted August 27, 2006 Somethng like this[code]switch ($_GET['page']){case "conact":include('contact.php');break; case "news":include('news.php');break;default:include('home.php');}[/code]where home.php is the main content on the index page Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.