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. Link to comment https://forums.phpfreaks.com/topic/18799-simple-php-beginner-question/ 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 Link to comment https://forums.phpfreaks.com/topic/18799-simple-php-beginner-question/#findComment-81094 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 Link to comment https://forums.phpfreaks.com/topic/18799-simple-php-beginner-question/#findComment-81104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.