phpRoshan Posted May 15, 2007 Share Posted May 15, 2007 Hi there, I would like to know how to set up a page navigating system in a web site using php codes. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/ Share on other sites More sharing options...
MadTechie Posted May 15, 2007 Share Posted May 15, 2007 PHP is server side so its basically echo or print you would probably have an XML or SQL menu setup and then echo/print to the screen which is (d)html/CSS Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-253578 Share on other sites More sharing options...
phpRoshan Posted May 15, 2007 Author Share Posted May 15, 2007 Tnx for the reply. But i'm a begener level php developer,so i would be gratefull if some one cud explain how to do it in either way, ??? Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-253581 Share on other sites More sharing options...
scottybwoy Posted May 15, 2007 Share Posted May 15, 2007 There are many ways to do it, an easy way is to do something like this: <?php echo <<<END <div id='nav'> <a href="home.php?nav=a">nav1</a> <a href="home.php?nav=b">nav2</a> <a href="home.php?nav=c">nav3</a> <a href="home.php?nav=d">nav4</a> <a href="home.php?nav=e">nav5</a> </div> END; ?> Then in home.php have a switch case function like : <?php switch ($nav) { case a: include page1.php; break; case b: include page2.php; break; case c: include page3.php; break; case d: include page4.php; break; case e: include page5.php; break; default : } ?> But I suggest you look these up in the php manual pages to get better understanding, happy coding Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-253676 Share on other sites More sharing options...
phpRoshan Posted May 15, 2007 Author Share Posted May 15, 2007 Yep, That helps me for my current project. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-253782 Share on other sites More sharing options...
BhaveshGangani Posted July 25, 2011 Share Posted July 25, 2011 How Make Page Navigation in php without reloading the page without jquery like facebook has. ex. for welcome page : http://www.facebook.com/?sk=welcome for friends list : http://www.facebook.com/?sk=ff&ap=1 for news feed link http://www.fack.com/?sk=nf with clicking the link instead of reloading whole page the appropriate content be loaded. how to do this without javascript, jquery Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-1246632 Share on other sites More sharing options...
wildteen88 Posted July 25, 2011 Share Posted July 25, 2011 How Make Page Navigation in php without reloading the page without jquery like facebook has. ex. for welcome page : http://www.facebook.com/?sk=welcome for friends list : http://www.facebook.com/?sk=ff&ap=1 for news feed link http://www.fack.com/?sk=nf with clicking the link instead of reloading whole page the appropriate content be loaded. how to do this without javascript, jquery If you don't want to use javascript then you'll have to use iframes. Quote Link to comment https://forums.phpfreaks.com/topic/51491-solved-how-to-do-page-navigation-bar-using-php-codes/#findComment-1246634 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.