PHP/HTML Programmers How Do I Create Html Pages Dynamically?

Programming, for all ages and all languages.
Post Reply
robinhood
Posts: 1
Joined: Fri Sep 28, 2007 1:41 am

PHP/HTML Programmers How Do I Create Html Pages Dynamically?

Post by robinhood »

Hi

At the moment I get my data for my WebPages from simple html files that I have to, cut and paste there title, body sections into my template file which has all my custom look and feel for my website. So the files get created automatically based on there title and I don't have to cut and paste the title and body of the simple html page into afree templates, and name it manually. Any scripts out there.

Thank
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post by os64dev »

This isn't just solvable by scripts. Learn Javascript, DOM, PHP and MySQL and then you can do anything, though you need to design first.

For instance changing the title will be in DOM document.title = 'new title'; in PHP you would generate the <TITLE>/<TITLE> thingy in the head section. PHP on the other hand works on a webserver and DOM at the client. See, the complication starts... were to put/do what on the server side or on the client side.

This is all fun... ofcourse but takes a lot of time.
Author of COBOS
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Place your header/footer (along with all styling info) into separate pages.

Then you can either:
- Place your header/footer into a frame (don't do this unless you want a pre-2000-ish look for your site).
- Use Javascript to include the header before your content, and the footer after.
- Find out what server side language your webhost supports (most likely ASP.net (Windows server) or PHP (non-Windows server)). Then use PHP/ASP.net to include your header/footer (the easiest and my recommended way).
- Use a WYSIWYG HTML editor that supports dynamic content and will automatically insert and update your header/footer for you on each page. Expression Web comes to mind.
My OS is Perception.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

os64dev wrote:See, the complication starts... were to put/do what on the server side or on the client side.
For a static page, it's best to put everything server side for several reasons. For dynamic content (real-time counters, etc) then you need to use client side.
My OS is Perception.
niteice
Member
Member
Posts: 59
Joined: Tue Oct 03, 2006 3:49 pm

Post by niteice »

Am I the only person that thinks that OP sounds rather fishy, given the link to what appears to be a somewhat shady web design firm?
Post Reply