HTML and Web Design Question?

  • Thread starter Thread starter BigMacko
  • Start date Start date
B

BigMacko

Guest
Most every site has a sidebar of some sort with the main links on every page of the site; however, sometimes you need to update those links. Is there a way to create a sidebar so that it's not individual on each page because then you have to change the sidebar on EVERY page and that can take a long time.
 
In PHP, simply create an "include" statement. This will point to a file on your server.

For example, in your page write:

<?php
include('sidebar.htm');
?>

Then, create a "sidebar.htm" file. When you update this file, it will update everywhere you have your 'include' statement.

Good luck!
 
Back
Top