Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 05-05-2006, 12:37 AM   #1 (permalink)
 
True Techie

Join Date: Jan 2006

Posts: 135

McHopsky is on a distinguished road

Send a message via AIM to McHopsky
Default What to use?

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!
__________________
McHopsky
McHopsky is offline  
Old 05-05-2006, 04:25 AM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

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.
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
Old 05-05-2006, 12:52 PM   #3 (permalink)
 
True Techie

Join Date: Jan 2006

Posts: 135

McHopsky is on a distinguished road

Send a message via AIM to McHopsky
Default

Quote:
Originally posted by TheHeadFL
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!
__________________
McHopsky
McHopsky is offline  
Old 05-05-2006, 04:41 PM   #4 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,413

office politics will become famous soon enough

Default

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.
office politics is offline  
Old 05-06-2006, 07:17 PM   #5 (permalink)
 
Super Techie

Join Date: Oct 2005

Posts: 385

raross

Default

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.
__________________
MCSD, MCAD, CCNA, CIW-A, Linux+, Server+, Security+, Project+, iNet+, Network+, A+, MCP
raross is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On