1 Replies - 561 Views - Last Post: 13 February 2014 - 07:56 AM

#1 Wolverine89  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 68
  • Joined: 14-January 14

Page content update when clicked on menu item

Posted 13 February 2014 - 03:58 AM

Hi guys,

I am doing some research the find the best way to update my page content.
some prior information:

My project uses an index.php which contains includes to my menu, header, content and footer. There is a Left_Content.php and a Right_Content.php how can i update my content when i click on a menu about, for example About. I want to update my left or right content without copying my code 20 or 30 times.

Code below:
INDEX.PHP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Book Store</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="main_container">
	<div class="parrot"><img src="img/arrow.jpg" alt="" title=""></div>
	<div class="main_content">
    	<?php 
    	include_once ("inc/Header.php")
    	?>
        <div class="top_center_box"></div>
        <div class="center_box">
		<?php 
			include ("inc/Menu.php");
       	 	include ("inc/Middlebox.php");
        	include ("inc/Left_Content.php");
        	include ("inc/Right_Content.php");
			include ("inc/Footer.php");
		?>

		</div> <!--end of center box-->
	</div> <!--end of main content-->
</div> <!--end of main container-->
</body>
</html>



Webpage, so when clicked on about categories change to about information
http://puu.sh/6UmBO.jpg
http://puu.sh/6UmBO.jpg



Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Page content update when clicked on menu item

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9573
  • View blog
  • Posts: 36,255
  • Joined: 12-June 08

Re: Page content update when clicked on menu item

Posted 13 February 2014 - 07:56 AM

You can have the links go to an entirely new page.. based on some sort of session variable passed.. or use an ajax control to load data from a databases.. there are multiple options.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1