Website Design Using Html And Php(no Javascript/jquery/ajax)
I am new to website designing, and i am starting with building webapplication for my small cd database. I have four div on my page Header nav content footer in my n
Solution 1:
if you don't like using to javascript you can try to change you structure of php like : home.php :
<?phpinclude'header.php';
include'menu.php';
include'content.php';
include'footer.php';
?>
in header.php : a banner or logo with text. in menu.php : your links like
<?phpecho'<a href="./home.php">Home</a><br/>';
echo'<a href="./home.php?m=1">About</a><br/>';
echo'<a href="./home.php?m=2">Products</a><br/>';
echo'<a href="./home.php?m=3">Services</a><br/>';
echo'<a href="./home.php?m=4">Contact</a><br/>';
?>
in content.php:
<?phpif(!isset($_GET['m'])) $_GET['m']=0;
switch($_GET['m']){
case0:
include'page_0.php';
break;
case1:
include'page_1.php';
break;
case2:
include'page_2.php';
break;
case3:
include'page_3.php';
break;
case4:
include'page_4.php';
break;
}
?>
so you need to create all thèses page_0.php ... page_4.php
hope this code will help you.
Solution 2:
What I would do is place another div inside the div you already have, give it an id of content1 or something.
Then change the display property when you click a link
<script>document.getElementById("content1").style.display = 'block'; would display the div
document.getElementById("content1").style.display = 'none'; would hide the div
</script>
This would be the easiest way to do it, you can also use CSS, you really can't do it with HTML, and PHP isn't use for stuff like that.
Post a Comment for "Website Design Using Html And Php(no Javascript/jquery/ajax)"