Jump to content

Recommended Posts

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

 

 

  • 4 years later...

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.