What to use?

Status
Not open for further replies.

McHopsky

In Runtime
Messages
135
I know the basics of HTML, enough to build me a simple website. Recently I've been building a more complicated website with many pages. The layout is a navigation bar (a table) on the side and a heading image on top . I have about... 15 pages and the only thing that differs from each page is the body content. The problem is... when I need to make a change to a link on the navigation bar I have to do it to all 15 pages. I know this isnt the right way to do this considering that most of the websites are 10x more complicated than mine and would take them days to make an update. The extension for each page of mine is .html or .htm were as I see most (good) websites is either .asp or .php. What do I need to learn in order to make my updating a lot easier?


Thanks!
 
Learn PHP and use templates.

You design a template, and store each page text in another text file or in a database. The PHP script parses the template and puts in the appropriate data.

Change the template, change every page.
 
TheHeadFL said:
Learn PHP and use templates.

You design a template, and store each page text in another text file or in a database. The PHP script parses the template and puts in the appropriate data.

Change the template, change every page.


I figured it was something like that. I hope I can find some kind of source for this. Thanks for the help, much appreciated!
 
this will teach you how to use asp to interact with a database. While it isn't exactly what you want, it will teach you what you need to know to build the site.

You would prolly use their sample as a backend page to modify each page's data/body. Then, create frontend pages to display the content.

http://www.asp101.com/samples/db_edit.asp

Here's a quick sample that ties together a number of database functions into a simple little script for adding, deleting, and editing data in a database table. It's a pretty simple little script, but it illustrates a number of useful techniques and should help tie all the pieces together into one script.
 
Here is a rather simple and fast way of doing it. Switch the extension to .php and put the HTML code for the menu in a seperate file, named menu.txt etc... Then put this code where you took the menu out of the original html file.

<?php include 'menu.txt' ?>

You will have to do this to all the pages you already created, but once this is done, you will just have to update menu.txt and it will update on every page. You should make sure you learn CSS which will allow you to change colors etc dynamically using one file also.
 
Status
Not open for further replies.
Back
Top Bottom