rik72 Posted February 25, 2009 Share Posted February 25, 2009 In think from this bit of code you can see what i am trying to achieve, im just not achieving it. $cont = load_template("main-content"); if ($_GET['content_id']="") { $contid = "about"; } else { $contid = $_GET['content_id']; }; thanks in advance for any help! Quote Link to comment https://forums.phpfreaks.com/topic/146942-problem-with-page-loading-correctly/ Share on other sites More sharing options...
annihilate Posted February 25, 2009 Share Posted February 25, 2009 Try this: <?php $cont = load_template("main-content"); $contid = $_GET['content_id'] == "" ? "about" : $_GET['content_id']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/146942-problem-with-page-loading-correctly/#findComment-771440 Share on other sites More sharing options...
Philip Posted February 25, 2009 Share Posted February 25, 2009 It's because if ($_GET['content_id']="") should be: if ($_GET['content_id'] == "") Quote Link to comment https://forums.phpfreaks.com/topic/146942-problem-with-page-loading-correctly/#findComment-771442 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.