me1000 Posted October 17, 2006 Share Posted October 17, 2006 im using a template page, and the contents of the page is displayed using this code...[code]if ($page == "") { include("home.php"); } else { include($page.".php"); }[/code]It works fine now, but i want to know if there is a better way to do it.I know that what Im asking is very broad lolbasically what happens is the URL is index.php?page=somethingbut if there is no var defined, then it includes home.php if it is defined then it includes whatever the var is..Thanks, Quote Link to comment Share on other sites More sharing options...
marcus Posted October 17, 2006 Share Posted October 17, 2006 [code]if ($page == false) { include("home.php"); } else { include($page.".php"); }[/code] 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.