zeek Posted February 26, 2007 Share Posted February 26, 2007 Ok guys, I have beend trying to do this for at least one whole month now, I Keep on getting different codes in tutorials from people but none of them will work. What I really want is to include my news section in the layout using the php include code. Also when ever I click on a link I want it to load up in the news sections. The code that I have now does load properly, but thats because its the default page. When ever I try clicking on the other links in the navigation section they do not load, the page reloads but the default page (News.php) is still there. Can one of you help me out please, I really want to learn how to do that properly. Thanks a million... Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/ Share on other sites More sharing options...
JBS103 Posted February 26, 2007 Share Posted February 26, 2007 Show us some code. Give us a clue as to how you are doing what you have right now. As you said, there are a lot of different methods, so we have no clue as to where you are going wrong. Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-194635 Share on other sites More sharing options...
redarrow Posted February 26, 2007 Share Posted February 26, 2007 I am ready for action post that code NOW? Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-194639 Share on other sites More sharing options...
zeek Posted February 27, 2007 Author Share Posted February 27, 2007 Here is the code ---------------------- <?php switch($id) { default: include('news.php'); break; case"affiliates":include('affiliates.php'); break; case"what2":include('whatever2.htm'); break; case"what3":include('whatever3.htm'); break; case"what4":include('whatever4.htm'); break; case"what5":include('whatever5.htm'); } ?> Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-194931 Share on other sites More sharing options...
HaLo2FrEeEk Posted February 27, 2007 Share Posted February 27, 2007 Well, I'll format your code in a readable fashion: <?php switch($id) { default: include('news.php'); break; case"affiliates": include('affiliates.php'); break; case"what2": include('whatever2.htm'); break; case"what3": include('whatever3.htm'); break; case"what4": include('whatever4.htm'); break; case"what5": include('whatever5.htm'); break; } ?> You didn't have the final break in your switch statement. Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-194933 Share on other sites More sharing options...
zeek Posted February 27, 2007 Author Share Posted February 27, 2007 So how do I change my links now, how should I use the php in them?? Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-195148 Share on other sites More sharing options...
zeek Posted February 27, 2007 Author Share Posted February 27, 2007 The code does load up now, but the thing is, it load on a page by itself, you only see the affiliates section, its not loaded in the content area on the layout. :'( Link to comment https://forums.phpfreaks.com/topic/40221-php-navigation-plzzzzzzzzzzzz-help/#findComment-195442 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.