Anyone know how to write this kind of stuff? I know HTML, XHTML, and JavaScript - but no server-side code. I have no idea on these two, and I can't find any good tutorials. Here's what I want to write: index.php include header.htm include page.htm include middle.htm include menu.htm include footer.htm Whereas header, middle, and footer would be the same for all the pages on my site, and page and menu would be different for each page (defined in the php file). ----- I've also heard it could be done with SSI... but I do not know if my webserver can run those (I'm pretty sure it can run PHP). But could I do it like this, too? If so, how?
If your webserver runs Apache it most probably can handle SSI (unless they disabled it). Anyway I recommend PHP anyway. It was specifically designed for the web, and it's a pretty complete programming language with facilities for database use, object orientation, etc. Second there are tons of ready made free scripts for doing web site portals and content management systems that you can just install and are ready to go after configuration. Both Sourceforge.net and Hotscripts.com have tons of PHP scripts for everything. There are also tons of PHP tutorials out there. I started with the simple tutorials at: PHPBuilder Developer Shed The book Professional PHP Programming by Wrox press was also a good starting point. If I understand correctly, what you are trying to do would be simple in PHP. But if you are trying to do a portal style website with a consistent look and feel I would recommen downloading a few scripts designed for that and install them. At my site I use phpWebsite, which pretty much takes care of all that, but there are many others like Postnuke, PHP-CMS, Mambo, Drupal, and many others.
PHP is simple to include files. Code html just as you would normally, but save it as a .php file. Then when you want to include the file put the following: <?php include('path/to/file.extention'); ?> ¤Night